FbConnection

Struct FbConnection 

Source
pub struct FbConnection {
    pub raw: SimpleConnection,
    /* private fields */
}

Fields§

§raw: SimpleConnection

Implementations§

Source§

impl FbConnection

Source

pub fn init(conn: FbRawConnection) -> ConnectionResult<Self>

Create a diesel instance from a active firebird connection

Trait Implementations§

Source§

impl Connection for FbConnection

Source§

type TransactionManager = FbTransactionManager

The transaction manager implementation used by this connection
Source§

type Backend = Fb

The backend this type connects to
Source§

fn establish(database_url: &str) -> ConnectionResult<Self>

Establishes a new connection to the database Read more
Source§

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
Source§

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

Get access to the current transaction state of this connection Read more
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<'conn, 'query> ConnectionGatWorkaround<'conn, 'query, Fb> for FbConnection

Source§

type Cursor = Box<dyn Iterator<Item = Result<<FbConnection as ConnectionGatWorkaround<'conn, 'query, Fb>>::Row, Error>>>

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

type Row = FbRow

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

impl LoadConnection for FbConnection
where (): Helper,

Source§

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
Source§

impl SimpleConnection for FbConnection

Source§

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

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

impl TransactionManager<FbConnection> for FbTransactionManager

Source§

type TransactionStateData = FbTransactionManager

Data stored as part of the connection implementation to track the current transaction state of a connection
Source§

fn begin_transaction(conn: &mut FbConnection) -> QueryResult<()>

Begin a new transaction or savepoint Read more
Source§

fn rollback_transaction(conn: &mut FbConnection) -> QueryResult<()>

Rollback the inner-most transaction or savepoint Read more
Source§

fn commit_transaction(conn: &mut FbConnection) -> QueryResult<()>

Commit the inner-most transaction or savepoint Read more
Source§

fn transaction_manager_status_mut( conn: &mut FbConnection, ) -> &mut TransactionManagerStatus

Fetch the current transaction status as mutable Read more
Source§

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
Source§

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§

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> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,