public SyncChange(int rowId, string tableName, string schemaName, Operation operation, RowChangeStatus rowChangeStatus, int primaryKey1, int transactionId, int primaryKey2 = -1) { this.TableName = tableName; this.SchemaName = schemaName; this.RowId = rowId; this.Operation = operation; this.RowChangeStatus = rowChangeStatus; this.PrimaryKey1 = primaryKey1; this.PrimaryKey2 = primaryKey2; this.TransactionId = transactionId; }
public SyncChange(int rowId, string tableName, string schemaName, Operation operation, RowChangeStatus rowChangeStatus, int primaryKey1, int transactionId, int primaryKey2 = -1) { this.TableName = tableName; this.SchemaName = schemaName; this.RowId = rowId; this.Operation = operation; this.RowChangeStatus = rowChangeStatus; this.PrimaryKey1 = primaryKey1; this.PrimaryKey2 = primaryKey2; this.TransactionId = transactionId; }
public void UpdateStatusOfChanges(IEnumerable<SyncChange> changes, RowChangeStatus newStatus) { string sql = "update " + tableSet.FullyQualifiedSyncTableName + " set status = ?status where id = ?id;"; var queryList = new List<SQLQuery>(); //TODO:this can be a single query... foreach (var change in changes) { var query = new SQLQuery(sql, SQLQueryType.NonQuery); query.Parameters.Add("status", (int) newStatus); query.Parameters.Add("id", change.RowId); queryList.Add(query); } SourceDb.RunQuery(queryList, true); }
public void UpdateStatusOfChanges(IEnumerable <SyncChange> changes, RowChangeStatus newStatus) { string sql = "update " + tableSet.FullyQualifiedSyncTableName + " set status = ?status where id = ?id;"; var queryList = new List <SQLQuery>(); //TODO:this can be a single query... foreach (var change in changes) { var query = new SQLQuery(sql, SQLQueryType.NonQuery); query.Parameters.Add("status", (int)newStatus); query.Parameters.Add("id", change.RowId); queryList.Add(query); } SourceDb.RunQuery(queryList, true); }