public void OpenIndex(long indexId, IndexFileInfo ci) { IndexFile ixf; IxDict.TryGetValue(indexId, out ixf); if (ixf == null) { var stream = Database.OpenFile(FileType.Index, indexId); IxDict[indexId] = new IndexFile(stream, ci, Database, indexId); } }
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 ); }
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 ); }