Ejemplo n.º 1
0
        internal Database(DatabaseSystem system, IDatabaseContext context)
        {
            System = system;
            Context = context;

            Name = Context.DatabaseName();

            DiscoverDataVersion();

            TableComposite = new TableSourceComposite(this);

            Context.RegisterInstance(this);
            Context.RegisterInstance<ITableSourceComposite>(TableComposite);

            Locker = new Locker(this);

            Sessions = new ActiveSessionList(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);
        }
Ejemplo n.º 2
0
        internal Database(DatabaseSystem system, IDatabaseContext context)
        {
            System  = system;
            Context = context;

            Name = Context.DatabaseName();

            DiscoverDataVersion();

            TableComposite = new TableSourceComposite(this);

            Context.RegisterInstance(this);
            Context.RegisterInstance <ITableSourceComposite>(TableComposite);

            Locker = new Locker(this);

            Sessions = new ActiveSessionList(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);
        }
Ejemplo n.º 3
0
        internal Database(DatabaseSystem system, string name, IConfiguration configuration)
            : base(system, KnownScopes.Database)
        {
            System        = system;
            Name          = name;
            Configuration = configuration;

            Locker = new Locker(this);

            Scope.AsContainer().RegisterInstance <IDatabase>(this);

            transactions = new OpenTransactionCollection();
        }