pub struct DB { /* private fields */ }
Expand description
SQLite database connection
Implementations§
source§impl DB
impl DB
pub fn new( schema: Schema, path: &str, mode: CreateMode ) -> Result<Self, DBError>
sourcepub fn new_in_memory(schema: Schema) -> Result<Self, DBError>
pub fn new_in_memory(schema: Schema) -> Result<Self, DBError>
Mostly for use in tests, but may be useful in some applications as well.
sourcepub fn query_interface(&self) -> QueryInterface<'_>
pub fn query_interface(&self) -> QueryInterface<'_>
Get a query interface for this DB connection
pub fn recreate_schema(&self) -> Result<(), DBError>
Auto Trait Implementations§
impl !RefUnwindSafe for DB
impl Send for DB
impl !Sync for DB
impl Unpin for DB
impl !UnwindSafe for DB
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