public TableUpdateStrategyIndexNonUnique( EventBeanUpdateHelperNoCopy updateHelper, ISet<string> affectedIndexNames) { this.updateHelper = updateHelper; this.affectedIndexNames = affectedIndexNames; }
public TableUpdateStrategyWUniqueConstraint( EventBeanUpdateHelperNoCopy updateHelper, ISet<string> affectedIndexNames) { _updateHelper = updateHelper; _affectedIndexNames = affectedIndexNames; }
public InfraOnMergeActionUpd( ExprEvaluator optionalFilter, EventBeanUpdateHelperWCopy namedWindowUpdate) : base( optionalFilter) { this.namedWindowUpdate = namedWindowUpdate; tableUpdate = null; }
public InfraOnMergeActionUpd( ExprEvaluator optionalFilter, EventBeanUpdateHelperNoCopy tableUpdate, Table table) : base(optionalFilter) { this.tableUpdate = tableUpdate; namedWindowUpdate = null; this.table = table; InitTableUpdateStrategy(table); }
public InfraOnUpdateViewFactory( EventType infraEventType, EventBeanUpdateHelperWCopy updateHelperNamedWindow, EventBeanUpdateHelperNoCopy updateHelperTable, Table table, StatementContext statementContext) : base( infraEventType) { UpdateHelperNamedWindow = updateHelperNamedWindow; UpdateHelperTable = updateHelperTable; this.table = table; if (table != null) { InitTableUpdateStrategy(table); table.AddUpdateStrategyCallback(this); statementContext.AddFinalizeCallback( new ProxyStatementFinalizeCallback { ProcStatementDestroyed = context => { this.table.RemoveUpdateStrategyCallback(this); } }); } }
public static TableUpdateStrategy ValidateGetTableUpdateStrategy( TableMetaData tableMetadata, EventBeanUpdateHelperNoCopy updateHelper, bool isOnMerge) { var desc = GetAffectedIndexes(tableMetadata, updateHelper.UpdatedProperties); // with affected indexes and with uniqueness : careful updates, may need to rollback if (desc.AffectedIndexNames != null && desc.IsUniqueIndexUpdated) { if (isOnMerge) { throw new ExprValidationException("On-merge statements may not update unique keys of tables"); } return new TableUpdateStrategyWUniqueConstraint(updateHelper, desc.AffectedIndexNames); } // with affected indexes and without uniqueness : update indexes without unique key violation and rollback if (desc.AffectedIndexNames != null) { return new TableUpdateStrategyIndexNonUnique(updateHelper, desc.AffectedIndexNames); } // no affected indexes, the fasted means of updating return new TableUpdateStrategyNonIndex(updateHelper); }
public TableUpdateStrategyNonIndex(EventBeanUpdateHelperNoCopy updateHelper) { this.updateHelper = updateHelper; }