Struct rustdb::table::Table[][src]

pub struct Table {
    pub file: Rc<SortedFile>,
    pub info: Rc<ColInfo>,
    pub ixlist: RefCell<IxList>,
    pub id: i64,
    pub id_gen: Cell<i64>,
    pub id_gen_dirty: Cell<bool>,
}
Expand description

Database base table. Underlying file, type information about the columns and id allocation.

Fields

file: Rc<SortedFile>

Underlying SortedFile.

info: Rc<ColInfo>

Type information about the columns.

ixlist: RefCell<IxList>

List of indexes. ( Maybe could eliminate the RefCell )

id: i64

Table id in sys.Table.

id_gen: Cell<i64>

Row id allocator.

id_gen_dirty: Cell<bool>

Row id allocator has changed.

Implementations

Construct a table with specified info.

Save or Rollback underlying files.

Drop the underlying file storage ( the table is not useable after this ).

Insert specified row into the table.

Remove specified loaded row from the table.

Look for indexed table expression based on supplied WHERE expression (we).

Get record with specified id.

Get record with matching key, using specified index.

Scan all the records in the table.

Get a single record with specified id.

Get records with matching key.

Get records with matching keys.

Add the specified index to the table.

Delete the specified index.

Initialises last index ( called just after add_index ).

Utility for accessing fields by number.

Utility for updating fields by number.

Construct a row for the table.

Allocate row id.

Update id allocator if supplied row id exceeds current value.

Repack the file pages.

Add the all the pages used by the table to the specified set.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.