Struct SqliteConnection

Source
pub struct SqliteConnection { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl Connection for SqliteConnection

Source§

type Backend = Sqlite

The backend this type connects to
Source§

type TransactionManager = AnsiTransactionManager

The transaction manager implementation used by this connection
Source§

fn establish(url: &str) -> Result<SqliteConnection, ConnectionError>

Establishes a new connection to the database Read more
Source§

fn execute_returning_count<T>(&mut self, source: &T) -> Result<usize, Error>

Execute a single SQL statements given by a query and return number of affected rows
Source§

fn transaction_state( &mut self, ) -> &mut <<SqliteConnection as Connection>::TransactionManager as TransactionManager<SqliteConnection>>::TransactionStateData

Get access to the current transaction state of this connection Read more
Source§

fn instrumentation(&mut self) -> &mut (dyn Instrumentation + 'static)

Get the instrumentation instance stored in this connection
Source§

fn set_instrumentation(&mut self, _instrumentation: impl Instrumentation)

Set a specific Instrumentation implementation for this connection
Source§

fn transaction<T, E, F>(&mut self, f: F) -> Result<T, E>
where F: FnOnce(&mut Self) -> Result<T, E>, E: From<Error>,

Executes the given function inside of a database transaction Read more
Source§

fn begin_test_transaction(&mut self) -> Result<(), Error>

Creates a transaction that will never be committed. This is useful for tests. Panics if called while inside of a transaction or if called with a connection containing a broken transaction
Source§

fn test_transaction<T, E, F>(&mut self, f: F) -> T
where F: FnOnce(&mut Self) -> Result<T, E>, E: Debug,

Executes the given function inside a transaction, but does not commit it. Panics if the given function returns an error. Read more
Source§

impl LoadConnection for SqliteConnection

Source§

type Cursor<'conn, 'query> = Cursor

The cursor type returned by LoadConnection::load Read more
Source§

type Row<'conn, 'query> = Row

The row type used as Iterator::Item for the iterator implementation of LoadConnection::Cursor
Source§

fn load<'conn, 'query, T>( &'conn mut self, source: T, ) -> Result<<SqliteConnection as LoadConnection>::Cursor<'conn, 'query>, Error>

Executes a given query and returns any requested values Read more
Source§

impl SimpleConnection for SqliteConnection

Source§

fn batch_execute(&mut self, query: &str) -> Result<(), Error>

Execute multiple SQL statements within the same string. Read more
Source§

impl ConnectionSealed for SqliteConnection

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<C> BoxableConnection<<C as Connection>::Backend> for C
where C: Connection + Any,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Maps the current connection to std::any::Any
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoSql for T

Source§

fn into_sql<T>(self) -> Self::Expression

Convert self to an expression for Diesel’s query builder. Read more
Source§

fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
where &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,

Convert &self to an expression for Diesel’s query builder. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.