Struct rustdb::Database[][src]

pub struct Database {
Show 15 fields pub file: AccessPagedData, pub sys_schema: TablePtr, pub sys_table: TablePtr, pub sys_column: TablePtr, pub sys_index: TablePtr, pub sys_index_col: TablePtr, pub sys_function: TablePtr, pub bs: ByteStorage, pub schemas: RefCell<HashMap<String, i64>>, pub tables: RefCell<HashMap<ObjRef, TablePtr>>, pub functions: RefCell<HashMap<ObjRef, FunctionPtr>>, pub builtins: RefCell<HashMap<String, (DataKind, CompileFunc)>>, pub function_reset: Cell<bool>, pub lastid: Cell<i64>, pub err: Cell<bool>,
}
Expand description

Database with SQL-like interface.

Fields

file: AccessPagedData

Page storage.

sys_schema: TablePtrsys_table: TablePtrsys_column: TablePtrsys_index: TablePtrsys_index_col: TablePtrsys_function: TablePtrbs: ByteStorage

Storage of variable length data.

schemas: RefCell<HashMap<String, i64>>tables: RefCell<HashMap<ObjRef, TablePtr>>functions: RefCell<HashMap<ObjRef, FunctionPtr>>builtins: RefCell<HashMap<String, (DataKind, CompileFunc)>>function_reset: Cell<bool>

Flag to reset the functions cache after save.

lastid: Cell<i64>

Last id generated by INSERT.

err: Cell<bool>

Has there been an error since last save?

Implementations

Construct a new DB, based on the specified file.

Register a builtin function.

Run a batch of SQL.

Run a batch of SQL, printing the execution time.

Run a batch of SQL.

Save updated tables to underlying file ( or rollback if there was an error ).

Get the named table.

Get the named function.

Insert the table into the map of tables.

Get code for value.

Decode u64 to bytes.

Delete encoding.

Allocate a page of underlying file storage.

Free a page of underyling file storage.

Trait Implementations

Clear function instructions to avoid leaking memory.

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.