pub struct BorrowedSqliteConnection { /* private fields */ }Expand description
A borrowed SQLite connection
This type is provided to various hook functions called by SQLite internally
It mostly acts as &mut SqliteConnection with the additional constraint
that you cannot move out/replace the inner connection handle
Any hook (update, commit, rollback, progress, wal, busy handler, authorizer, trace, collation needed)
is reset after the closure that gets this connection type as argument ends. This specifically means
that any hook registered during [register_auto_extension] won’t trigger later
Implementations§
Source§impl BorrowedSqliteConnection
impl BorrowedSqliteConnection
Sourcepub unsafe fn inner_mut(&mut self) -> &mut SqliteConnection
pub unsafe fn inner_mut(&mut self) -> &mut SqliteConnection
Get access to the underlying SqliteConnection
§Safety
- You are not allowed to move the connection out of the provided reference or otherwise replace the connection
Trait Implementations§
Source§impl Connection for BorrowedSqliteConnection
impl Connection for BorrowedSqliteConnection
Source§fn establish(_database_url: &str) -> ConnectionResult<Self>
fn establish(_database_url: &str) -> ConnectionResult<Self>
Establishes a new connection to the database Read more
Source§fn set_instrumentation(&mut self, instrumentation: impl Instrumentation)
fn set_instrumentation(&mut self, instrumentation: impl Instrumentation)
Set a specific
Instrumentation implementation for this connectionSource§fn set_prepared_statement_cache_size(&mut self, size: CacheSize)
fn set_prepared_statement_cache_size(&mut self, size: CacheSize)
Set the prepared statement cache size to
CacheSize for this connectionSource§fn transaction<T, E, F>(&mut self, f: F) -> Result<T, E>
fn transaction<T, E, F>(&mut self, f: F) -> Result<T, E>
Executes the given function inside of a database transaction Read more
Source§fn begin_test_transaction(&mut self) -> QueryResult<()>
fn begin_test_transaction(&mut self) -> QueryResult<()>
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§impl Drop for BorrowedSqliteConnection
impl Drop for BorrowedSqliteConnection
Source§impl LoadConnection for BorrowedSqliteConnection
impl LoadConnection for BorrowedSqliteConnection
Source§type Cursor<'conn, 'query> = <SqliteConnection as LoadConnection>::Cursor<'conn, 'query>
where
Self: 'conn
type Cursor<'conn, 'query> = <SqliteConnection as LoadConnection>::Cursor<'conn, 'query> where Self: 'conn
The cursor type returned by
LoadConnection::load Read moreSource§type Row<'conn, 'query> = <SqliteConnection as LoadConnection>::Row<'conn, 'query>
where
Self: 'conn
type Row<'conn, 'query> = <SqliteConnection as LoadConnection>::Row<'conn, 'query> where Self: 'conn
The row type used as
Iterator::Item for the iterator implementation
of LoadConnection::CursorSource§impl SimpleConnection for BorrowedSqliteConnection
impl SimpleConnection for BorrowedSqliteConnection
Source§fn batch_execute(&mut self, query: &str) -> QueryResult<()>
fn batch_execute(&mut self, query: &str) -> QueryResult<()>
Execute multiple SQL statements within the same string. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for BorrowedSqliteConnection
impl !Sync for BorrowedSqliteConnection
impl !UnwindSafe for BorrowedSqliteConnection
impl Freeze for BorrowedSqliteConnection
impl Send for BorrowedSqliteConnection
impl Unpin for BorrowedSqliteConnection
impl UnsafeUnpin for BorrowedSqliteConnection
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> AggregateDistinct<Self>where
Self: DistinctDsl,
fn aggregate_distinct(self) -> AggregateDistinct<Self>where
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> AggregateAll<Self>where
Self: AllDsl,
fn aggregate_all(self) -> AggregateAll<Self>where
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> AggregateFilter<Self, P>
fn aggregate_filter<P>(self, f: P) -> AggregateFilter<Self, P>
Add an aggregate function filter Read more
Source§fn aggregate_order<O>(self, o: O) -> AggregateOrder<Self, O>where
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> AggregateOrder<Self, O>where
Self: OrderAggregateDsl<O>,
Add an aggregate function order Read more
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
Source§impl<C> BoxableConnection<<C as Connection>::Backend> for Cwhere
C: Connection + Any,
impl<C> BoxableConnection<<C as Connection>::Backend> for Cwhere
C: Connection + Any,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§impl<T> WindowExpressionMethods for T
impl<T> WindowExpressionMethods for T
Source§fn over(self) -> Over<Self>where
Self: OverDsl,
fn over(self) -> Over<Self>where
Self: OverDsl,
Turn a function call into a window function call Read more
Source§fn window_filter<P>(self, f: P) -> WindowFilter<Self, P>
fn window_filter<P>(self, f: P) -> WindowFilter<Self, P>
Add a filter to the current window function Read more
Source§fn partition_by<E>(self, expr: E) -> PartitionBy<Self, E>where
Self: PartitionByDsl<E>,
fn partition_by<E>(self, expr: E) -> PartitionBy<Self, E>where
Self: PartitionByDsl<E>,
Add a partition clause to the current window function Read more
Source§fn window_order<E>(self, expr: E) -> WindowOrder<Self, E>where
Self: OrderWindowDsl<E>,
fn window_order<E>(self, expr: E) -> WindowOrder<Self, E>where
Self: OrderWindowDsl<E>,
Add a order clause to the current window function Read more