C# Класс NetBase.Storage.FileTable

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
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
Open void

Открытые методы

Метод Описание
AddRow ( Row r ) : void

Writes a row to disk

CalculateTotalRowSize ( ) : int
CommitToDisk ( string filename ) : void

This method is intended to be used only when creating a new table. So; e.g. not for normal writes.

Dispose ( ) : void
FileTable ( ) : System
FileTable ( string filename ) : System

Opens up a file handle on the table data and reads in the header. Note the file is held open until the FileTable is disposed.

Find ( Predicate p ) : List

Yes, I am sure there is room for optimisation here...

NextRow ( ) : Row

Retrieve the next row. Uses a seek, assuming the underlying framework will be sensible about it (we should usually already be in position)

Reset ( ) : void

Rewind the table back to the beginning

ToByteArray ( ) : byte[]

This is really only needed for sending data over the network in which case the results will (currently) always be the results of a query, and therefore always a MemoryTable

Приватные методы

Метод Описание
Open ( string filename ) : void

Описание методов

AddRow() публичный Метод

Writes a row to disk
public AddRow ( Row r ) : void
r Row
Результат void

CalculateTotalRowSize() публичный Метод

public CalculateTotalRowSize ( ) : int
Результат int

CommitToDisk() публичный Метод

This method is intended to be used only when creating a new table. So; e.g. not for normal writes.
public CommitToDisk ( string filename ) : void
filename string
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

FileTable() публичный Метод

public FileTable ( ) : System
Результат System

FileTable() публичный Метод

Opens up a file handle on the table data and reads in the header. Note the file is held open until the FileTable is disposed.
public FileTable ( string filename ) : System
filename string
Результат System

Find() публичный Метод

Yes, I am sure there is room for optimisation here...
public Find ( Predicate p ) : List
p Predicate
Результат List

NextRow() публичный Метод

Retrieve the next row. Uses a seek, assuming the underlying framework will be sensible about it (we should usually already be in position)
public NextRow ( ) : Row
Результат Row

Reset() публичный Метод

Rewind the table back to the beginning
public Reset ( ) : void
Результат void

ToByteArray() публичный Метод

This is really only needed for sending data over the network in which case the results will (currently) always be the results of a query, and therefore always a MemoryTable
public ToByteArray ( ) : byte[]
Результат byte[]