Beispiel #1
0
 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;
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 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);
 }
Beispiel #4
0
        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);
        }