private void CopyTable(ITableSource tableSource, IIndexSet indexSet) { var tableInfo = tableSource.TableInfo; var tableName = tableInfo.TableName; if (visibleTables.ContainsKey(tableName)) { throw new ObjectNotFoundException(tableName); } // Copy the table and add to the list of visible tables. var source = Composite.CopySourceTable(tableSource, indexSet); AddVisibleTable(source, source.CreateIndexSet()); // Log in the journal that this transaction touched the table_id. int tableId = source.TableId; Transaction.OnTableCreated(tableId, tableName); Transaction.CreateNativeSequence(tableName); }
private void CopyTable(ITableSource tableSource, IIndexSet indexSet) { var tableInfo = tableSource.TableInfo; var tableName = tableInfo.TableName; var source = FindVisibleTable(tableName, false); if (source != null) { throw new ObjectNotFoundException(tableName); } // Copy the table and add to the list of visible tables. source = Composite.CopySourceTable(tableSource, indexSet); AddVisibleTable(source, source.CreateIndexSet()); // Log in the journal that this transaction touched the table_id. int tableId = source.TableId; Transaction.Registry.RegisterEvent(new TableCreatedEvent(tableId, tableName)); Transaction.CreateNativeSequence(tableName); }