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
파일 보기 프로젝트 열기: buttonpusher/NetBase 1 사용 예제들

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[]