internal TransactionWork(TableSourceComposite composite, Transaction transaction, IEnumerable<TableSource> selectedFromTables, IEnumerable<IMutableTable> touchedTables, TransactionRegistry journal) { Composite = composite; Transaction = transaction; SelectedFromTables = selectedFromTables; // Get individual journals for updates made to tables in this // transaction. // The list TableEventRegistry ChangedTables = touchedTables.Select(t => t.EventRegistry).Where(tableJournal => tableJournal.EventCount > 0); // The list of tables created by this journal. CreatedTables = journal.TablesCreated; // Ths list of tables dropped by this journal. DroppedTables = journal.TablesDropped; // The list of tables that constraints were alter by this journal ConstraintAlteredTables = journal.TablesConstraintAltered; // Get the list of all database objects that were created in the // transaction. ObjectsCreated = transaction.Registry.ObjectsCreated; // Get the list of all database objects that were dropped in the // transaction. ObjectsDropped = transaction.Registry.ObjectsDropped; CommitId = transaction.CommitId; }
internal TableManager(ITransaction transaction, TableSourceComposite composite) { if (transaction == null) throw new ArgumentNullException("transaction"); Transaction = transaction; Composite = composite; visibleTables = new List<TableSource>(); tableIndices = new List<IIndexSet>(); accessedTables = new List<IMutableTable>(); tableCache = new Dictionary<ObjectName, IMutableTable>(); selectedTables = new List<TableSource>(); }
public Database(IDatabaseContext context) { DatabaseContext = context; DiscoverDataVersion(); TableComposite = new TableSourceComposite(this); // Create the single row table var t = new TemporaryTable(context, "SINGLE_ROW_TABLE", new ColumnInfo[0]); t.NewRow(); SingleRowTable = t; TransactionFactory = new DatabaseTransactionFactory(this); }
private void Dispose(bool disposing) { if (disposing) { if (IsOpen) { // TODO: Report the error } TableComposite.Dispose(); DatabaseContext.Dispose(); } TableComposite = null; DatabaseContext = null; }