An on-disk table. This is loosely based on DBF of course, you can probably use it to read them. However, a lot of the fields are left empty - e.g. data types, etc. etc. These classes might make a good candidate for implementing IEnumerator
Наследование: ITable
Пример #1
0
 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;
 }
Пример #2
0
        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;
            }
        }