internal ITable Add(Sql.CreateTableQuery q) { FileTable ft = new FileTable(); foreach (Sql.CreateTableQuery.CreateField field in q.Fields) { Column item = new Column(); item.Name = field.Name; item.DataType = 'C'; ft.Columns.Add(item); } string filename = Path.Combine(_database.Directory, q.TableName + ".DBF"); ft.CommitToDisk(filename); return (ITable)ft; }
internal ITable this[string tableName] { get { string fullpath = Path.Combine(_database.Directory, tableName + ".dbf"); if (_tableCache.Contains(fullpath)) { return (ITable)_tableCache[fullpath]; } ITable t = new FileTable(fullpath); _tableCache.Add(fullpath, t); return t; } }