pub struct Database { /* private fields */ }Expand description
Main database struct that provides core operations in order to work with SQLite.
Trait Implementations§
Source§impl<'a> Connection<'a> for Database
impl<'a> Connection<'a> for Database
Source§fn open<T>(db_path: T) -> Result<Self, MinSqliteWrapperError<'a>>
fn open<T>(db_path: T) -> Result<Self, MinSqliteWrapperError<'a>>
Opens a database and creates a new database connection. If the filename does not exist,
it will be created. The file will be opened read/write if possible. If not, the file
will be opened read-only. Read more
Source§fn close(self) -> SqlitePrimaryResult
fn close(self) -> SqlitePrimaryResult
The sqlite3_close() is destructor for the sqlite3 object. Returns
SqlitePrimaryResult::Ok if the sqlite3 object is successfully destroyed
and all associated resources are deallocated. Read more
Source§impl Operations for Database
impl Operations for Database
Source§fn execute<'a, F>(
&self,
statement: String,
callback_fn: Option<F>,
) -> Result<SqlitePrimaryResult, MinSqliteWrapperError<'a>>
fn execute<'a, F>( &self, statement: String, callback_fn: Option<F>, ) -> Result<SqlitePrimaryResult, MinSqliteWrapperError<'a>>
A wrapper around prepare(), execute_prepared(), and kill(), that allows an
application to run multiple statements of SQL without having to use a lot of Rust code. Read more
Source§fn prepare<'a, F>(
&self,
statement: String,
callback_fn: Option<F>,
) -> Result<SqlStatement, MinSqliteWrapperError<'a>>
fn prepare<'a, F>( &self, statement: String, callback_fn: Option<F>, ) -> Result<SqlStatement, MinSqliteWrapperError<'a>>
Prepares SQL operation to be executed and then destroy. Read more
impl Send for Database
impl Sync for Database
Auto Trait Implementations§
impl Freeze for Database
impl RefUnwindSafe for Database
impl Unpin 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