Struct butane::db::sqlite::SQLiteConnection
source · pub struct SQLiteConnection { /* private fields */ }
Expand description
SQLite database connection.
Trait Implementations§
source§impl BackendConnection for SQLiteConnection
impl BackendConnection for SQLiteConnection
source§fn transaction(&mut self) -> Result<Transaction<'_>, Error>
fn transaction(&mut self) -> Result<Transaction<'_>, Error>
Begin a database transaction. The transaction object must be
used in place of this connection until it is committed and aborted.
source§fn backend(&self) -> Box<dyn Backend + 'static, Global>
fn backend(&self) -> Box<dyn Backend + 'static, Global>
Retrieve the backend backend this connection
fn backend_name(&self) -> &'static str
source§impl ConnectionMethods for SQLiteConnection
impl ConnectionMethods for SQLiteConnection
fn execute(&self, sql: &str) -> Result<(), Error>
fn query<'a, 'c, 'b>( &'c self, table: &str, columns: &'b [Column], expr: Option<BoolExpr>, limit: Option<i32>, offset: Option<i32>, sort: Option<&[Order]> ) -> Result<Box<dyn BackendRows + 'a, Global>, Error>where 'c: 'a,
fn insert_returning_pk( &self, table: &str, columns: &[Column], pkcol: &Column, values: &[SqlValRef<'_>] ) -> Result<SqlVal, Error>
source§fn insert_only(
&self,
table: &str,
columns: &[Column],
values: &[SqlValRef<'_>]
) -> Result<(), Error>
fn insert_only( &self, table: &str, columns: &[Column], values: &[SqlValRef<'_>] ) -> Result<(), Error>
Like
insert_returning_pk
but with no return valuesource§fn insert_or_replace(
&self,
table: &str,
columns: &[Column],
pkcol: &Column,
values: &[SqlValRef<'_>]
) -> Result<(), Error>
fn insert_or_replace( &self, table: &str, columns: &[Column], pkcol: &Column, values: &[SqlValRef<'_>] ) -> Result<(), Error>
Insert unless there’s a conflict on the primary key column, in which case update
fn update( &self, table: &str, pkcol: Column, pk: SqlValRef<'_>, columns: &[Column], values: &[SqlValRef<'_>] ) -> Result<(), Error>
fn delete_where(&self, table: &str, expr: BoolExpr) -> Result<usize, Error>
source§fn has_table(&self, table: &str) -> Result<bool, Error>
fn has_table(&self, table: &str) -> Result<bool, Error>
Tests if a table exists in the database.
fn delete( &self, table: &str, pkcol: &'static str, pk: SqlVal ) -> Result<(), Error>
Auto Trait Implementations§
impl !RefUnwindSafe for SQLiteConnection
impl Send for SQLiteConnection
impl !Sync for SQLiteConnection
impl Unpin for SQLiteConnection
impl !UnwindSafe for SQLiteConnection
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