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: TablePtr
sys_table: TablePtr
sys_column: TablePtr
sys_index: TablePtr
sys_index_col: TablePtr
sys_function: TablePtr
bs: 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 ). Returns the number of logical pages that were updated.
Get the named function.
Insert the table into the map of tables.
Allocate a page of underlying file storage.