Ejemplo n.º 1
0
 public IndexFile( FullyBufferedStream f, IndexFileInfo inf, DatabaseImp d, long indexId )
 {
   F = f; Inf = inf; Database = d; IndexId = indexId;
   Initialise();
   //System.Console.WriteLine("New IndexFile " + " Root=" + Root + " PageAlloc=" + PageAlloc );
   //Dump();
 }
Ejemplo n.º 2
0
        bool Dirty;         // Has the table been modified since the last commit or rollback?

        public Table(DatabaseImp database, Schema schema, string name, ColInfo ci, long tableId)
        {
            Database = database;
            TableId  = tableId;
            schema.TableDict[name] = this;

            IxInfo   = new IndexInfo[0];
            DataFile = Database.OpenFile(FileType.Table, tableId);

            InitColumnInfo(ci);

            // System.Console.WriteLine( "Opened " + Schema + "." + name + " RowSize=" + RowSize + " RowCount=" + RowCount );
        }
Ejemplo n.º 3
0
        public Table(DatabaseImp db, Schema schema, string name, ColInfo cols, long tableId)
        {
            TableId = tableId;

            schema.TableDict[name] = this;

            Schema = schema.Name;
            Name   = name;
            Db     = db;
            Ix     = new IndexInfo[0];
            Cols   = cols;

            DF = Db.OpenFile(FileType.Table, tableId);

            RowSize  = CalcRowSize(Cols);
            RowCount = (long)(DF.Length / RowSize);

            RB = new byte[RowSize];

            // System.Console.WriteLine( "Opened " + Schema + "." + name + " RowSize=" + RowSize + " RowCount=" + RowCount );
        }