pub struct Database { /* private fields */ }Expand description
An in-memory database.
Note: you will need a VirtualMachine
to execute queries on a database.
Implementationsยง
Sourceยงimpl Database
impl Database
pub fn new(name: BoundedString) -> Self
Sourcepub fn add_schema(&mut self, schema: Schema) -> &mut Self
pub fn add_schema(&mut self, schema: Schema) -> &mut Self
Add a new schema.
Sourcepub fn name(&self) -> &BoundedString
pub fn name(&self) -> &BoundedString
The name of the database.
Sourcepub fn default_schema(&self) -> &Schema
pub fn default_schema(&self) -> &Schema
The default schema.
Sourcepub fn default_schema_mut(&mut self) -> &mut Schema
pub fn default_schema_mut(&mut self) -> &mut Schema
Mutable reference to the default schema.
pub fn schema_by_name(&self, name: &BoundedString) -> Option<&Schema>
pub fn schema_by_name_mut( &mut self, name: &BoundedString, ) -> Option<&mut Schema>
Auto Trait Implementationsยง
impl Freeze for Database
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnsafeUnpin for Database
impl UnwindSafe for Database
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more