Struct rsfbclient_diesel::FbConnection
source · [−]pub struct FbConnection {
pub raw: FbRawConnection,
/* private fields */
}
Fields
raw: FbRawConnection
Trait Implementations
sourceimpl Connection for FbConnection
impl Connection for FbConnection
type TransactionManager = FbTransactionManager
type TransactionManager = FbTransactionManager
The transaction manager implementation used by this connection
sourcefn establish(database_url: &str) -> ConnectionResult<Self>
fn establish(database_url: &str) -> ConnectionResult<Self>
Establishes a new connection to the database Read more
sourcefn execute_returning_count<T>(&mut self, source: &T) -> QueryResult<usize> where
T: QueryFragment<Self::Backend> + QueryId,
fn execute_returning_count<T>(&mut self, source: &T) -> QueryResult<usize> where
T: QueryFragment<Self::Backend> + QueryId,
Execute a single SQL statements given by a query and return number of affected rows Read more
sourcefn transaction_state(
&mut self
) -> &mut <Self::TransactionManager as TransactionManager<Self>>::TransactionStateData
fn transaction_state(
&mut self
) -> &mut <Self::TransactionManager as TransactionManager<Self>>::TransactionStateData
Get access to the current transaction state of this connection Read more
sourcefn transaction<T, E, F>(&mut self, f: F) -> Result<T, E> where
F: FnOnce(&mut Self) -> Result<T, E>,
E: From<Error>,
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
sourceimpl<'conn, 'query> ConnectionGatWorkaround<'conn, 'query, Fb, DefaultLoadingMode> for FbConnection
impl<'conn, 'query> ConnectionGatWorkaround<'conn, 'query, Fb, DefaultLoadingMode> for FbConnection
type Cursor = Box<dyn Iterator<Item = Result<<FbConnection as ConnectionGatWorkaround<'conn, 'query, Fb, DefaultLoadingMode>>::Row, Error>> + 'static, Global>
type Cursor = Box<dyn Iterator<Item = Result<<FbConnection as ConnectionGatWorkaround<'conn, 'query, Fb, DefaultLoadingMode>>::Row, Error>> + 'static, Global>
The cursor type returned by LoadConnection::load
Read more
type Row = FbRow
type Row = FbRow
The row type used as Iterator::Item
for the iterator implementation
of ConnectionGatWorkaround::Cursor
Read more
sourceimpl LoadConnection<DefaultLoadingMode> for FbConnection where
(): Helper,
impl LoadConnection<DefaultLoadingMode> for FbConnection where
(): Helper,
sourcefn load<'conn, 'query, T>(
&'conn mut self,
source: T
) -> QueryResult<LoadRowIter<'conn, 'query, Self, Self::Backend, DefaultLoadingMode>> where
T: Query + QueryFragment<Self::Backend> + QueryId + 'query,
Self::Backend: QueryMetadata<T::SqlType>,
fn load<'conn, 'query, T>(
&'conn mut self,
source: T
) -> QueryResult<LoadRowIter<'conn, 'query, Self, Self::Backend, DefaultLoadingMode>> where
T: Query + QueryFragment<Self::Backend> + QueryId + 'query,
Self::Backend: QueryMetadata<T::SqlType>,
Executes a given query and returns any requested values Read more
sourceimpl SimpleConnection for FbConnection
impl SimpleConnection for FbConnection
sourcefn 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
sourceimpl TransactionManager<FbConnection> for FbTransactionManager
impl TransactionManager<FbConnection> for FbTransactionManager
type TransactionStateData = FbTransactionManager
type TransactionStateData = FbTransactionManager
Data stored as part of the connection implementation to track the current transaction state of a connection Read more
sourcefn begin_transaction(conn: &mut FbConnection) -> QueryResult<()>
fn begin_transaction(conn: &mut FbConnection) -> QueryResult<()>
Begin a new transaction or savepoint Read more
sourcefn rollback_transaction(conn: &mut FbConnection) -> QueryResult<()>
fn rollback_transaction(conn: &mut FbConnection) -> QueryResult<()>
Rollback the inner-most transaction or savepoint Read more
sourcefn commit_transaction(conn: &mut FbConnection) -> QueryResult<()>
fn commit_transaction(conn: &mut FbConnection) -> QueryResult<()>
Commit the inner-most transaction or savepoint Read more
sourcefn transaction_manager_status_mut(
conn: &mut FbConnection
) -> &mut TransactionManagerStatus
fn transaction_manager_status_mut(
conn: &mut FbConnection
) -> &mut TransactionManagerStatus
Fetch the current transaction status as mutable Read more
sourcefn transaction<F, R, E>(conn: &mut Conn, callback: F) -> Result<R, E> where
F: FnOnce(&mut Conn) -> Result<R, E>,
E: From<Error>,
fn transaction<F, R, E>(conn: &mut Conn, callback: F) -> Result<R, E> where
F: FnOnce(&mut Conn) -> Result<R, E>,
E: From<Error>,
Executes the given function inside of a database transaction Read more
sourcefn is_broken_transaction_manager(conn: &mut Conn) -> bool
fn is_broken_transaction_manager(conn: &mut Conn) -> bool
This methods checks if the connection manager is considered to be broken by connection pool implementations Read more
Auto Trait Implementations
impl !RefUnwindSafe for FbConnection
impl Send for FbConnection
impl !Sync for FbConnection
impl Unpin for FbConnection
impl !UnwindSafe for FbConnection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoSql for T
impl<T> IntoSql for T
sourcefn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
Convert self
to an expression for Diesel’s query builder. Read more
sourcefn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
T: SqlType + TypedExpressionType,
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
T: SqlType + TypedExpressionType,
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel’s query builder. Read more