pub trait AnyConnectionBackend: Any + Debug + Send + 'static {
Show 15 methods // Required methods fn name(&self) -> &str; fn close(self: Box<Self>) -> BoxFuture<'static, Result<()>>; fn ping(&mut self) -> BoxFuture<'_, Result<()>>; fn begin(&mut self) -> BoxFuture<'_, Result<()>>; fn commit(&mut self) -> BoxFuture<'_, Result<()>>; fn rollback(&mut self) -> BoxFuture<'_, Result<()>>; fn start_rollback(&mut self); fn shrink_buffers(&mut self); fn fetch_many<'q>( &'q mut self, query: &'q str, arguments: Option<AnyArguments<'q>> ) -> BoxStream<'q, Result<Either<AnyQueryResult, AnyRow>>>; fn fetch_optional<'q>( &'q mut self, query: &'q str, arguments: Option<AnyArguments<'q>> ) -> BoxFuture<'q, Result<Option<AnyRow>>>; fn prepare_with<'c, 'q: 'c>( &'c mut self, sql: &'q str, parameters: &[AnyTypeInfo] ) -> BoxFuture<'c, Result<AnyStatement<'q>>>; fn describe<'q>( &'q mut self, sql: &'q str ) -> BoxFuture<'q, Result<Describe<Any>>>; // Provided methods fn cached_statements_size(&self) -> usize { ... } fn clear_cached_statements(&mut self) -> BoxFuture<'_, Result<()>> { ... } fn as_migrate(&mut self) -> Result<&mut (dyn Migrate + Send + 'static)> { ... }
}

Required Methods§

source

fn name(&self) -> &str

The backend name.

source

fn close(self: Box<Self>) -> BoxFuture<'static, Result<()>>

Explicitly close this database connection.

This method is not required for safe and consistent operation. However, it is recommended to call it instead of letting a connection drop as the database backend will be faster at cleaning up resources.

source

fn ping(&mut self) -> BoxFuture<'_, Result<()>>

Checks if a connection to the database is still valid.

source

fn begin(&mut self) -> BoxFuture<'_, Result<()>>

Begin a new transaction or establish a savepoint within the active transaction.

Returns a [Transaction] for controlling and tracking the new transaction.

source

fn commit(&mut self) -> BoxFuture<'_, Result<()>>

source

fn rollback(&mut self) -> BoxFuture<'_, Result<()>>

source

fn start_rollback(&mut self)

source

fn shrink_buffers(&mut self)

source

fn fetch_many<'q>( &'q mut self, query: &'q str, arguments: Option<AnyArguments<'q>> ) -> BoxStream<'q, Result<Either<AnyQueryResult, AnyRow>>>

source

fn fetch_optional<'q>( &'q mut self, query: &'q str, arguments: Option<AnyArguments<'q>> ) -> BoxFuture<'q, Result<Option<AnyRow>>>

source

fn prepare_with<'c, 'q: 'c>( &'c mut self, sql: &'q str, parameters: &[AnyTypeInfo] ) -> BoxFuture<'c, Result<AnyStatement<'q>>>

source

fn describe<'q>( &'q mut self, sql: &'q str ) -> BoxFuture<'q, Result<Describe<Any>>>

Provided Methods§

source

fn cached_statements_size(&self) -> usize

The number of statements currently cached in the connection.

source

fn clear_cached_statements(&mut self) -> BoxFuture<'_, Result<()>>

Removes all statements from the cache, closing them on the server if needed.

source

fn as_migrate(&mut self) -> Result<&mut (dyn Migrate + Send + 'static)>

Implementors§