public TransactionCommit(TableSystemV2 tableSystem, ITransaction transaction, IEnumerable <ITableSource> selectedFromTables, IEnumerable <IMutableTable> touchedTables, ITransactionEventRegistry registry)
        {
            TableSystem = tableSystem;
            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 = registry.CreatedTables;
            // Ths list of tables dropped by this journal.
            DroppedTables = registry.DroppedTables;
            // The list of tables that constraints were alter by this journal
            ConstraintAlteredTables = registry.ConstraintAlteredTables;

            // Get the list of all database objects that were created in the
            // transaction.
            ObjectsCreated = registry.CreatedObjects;
            // Get the list of all database objects that were dropped in the
            // transaction.
            ObjectsDropped = registry.DroppedObjects;
        }
        internal TableSource(TableSystemV2 tableSystem, IStoreSystem storeSystem, int tableId, string sourceName)
        {
            TableSystem = tableSystem;
            StoreSystem = storeSystem;
            TableId     = tableId;
            SourceName  = sourceName;

            GC = new TableSourceGC(this);

            StoreName = MakeStoreName(tableId, sourceName);
        }