Beispiel #1
0
 protected override void InternalDeleteRow(Program program, Schema.TableVar table, IRow row)
 {
     GetTables(table.Scope)[table].Delete(ServerProcess.ValueManager, row);
                 #if USEMEMORYDEVICETRANSACTIONS
     if (InTransaction && !ServerProcess.NonLogged && !ServerProcess.CurrentTransaction.InRollback)
     {
         Transactions.CurrentTransaction().Operations.Add(new InsertOperation(ATable, (IRow)ARow.Copy()));
     }
                 #endif
 }
Beispiel #2
0
        protected override void InternalInsertRow(Program program, Schema.TableVar table, IRow row, BitArray valueFlags)
        {
            NativeTable localTable = GetTables(table.Scope)[table];

            if ((Device.MaxRowCount >= 0) && (localTable.RowCount >= Device.MaxRowCount) && (!InTransaction || !ServerProcess.CurrentTransaction.InRollback))
            {
                throw new DeviceException(DeviceException.Codes.MaxRowCountExceeded, Device.MaxRowCount.ToString(), table.DisplayName, Device.DisplayName);
            }

            localTable.Insert(ServerProcess.ValueManager, row);

                        #if USEMEMORYDEVICETRANSACTIONS
            if (InTransaction && !ServerProcess.NonLogged && !ServerProcess.CurrentTransaction.InRollback)
            {
                Transactions.CurrentTransaction().Operations.Add(new DeleteOperation(ATable, (IRow)ARow.Copy()));
            }
                        #endif
        }