[][src]Struct rsfbclient::Transaction

pub struct Transaction<'c, C> where
    C: FirebirdClient
{ /* fields omitted */ }

Implementations

impl<'c, C> Transaction<'c, C> where
    C: FirebirdClient
[src]

pub fn new(conn: &'c Connection<C>) -> Result<Self, FbError>[src]

Start a new transaction

pub fn commit(self) -> Result<(), FbError>[src]

Commit the current transaction changes

pub fn commit_retaining(&mut self) -> Result<(), FbError>[src]

Commit the current transaction changes, but allowing to reuse the transaction

pub fn rollback_retaining(&mut self) -> Result<(), FbError>[src]

Rollback the current transaction changes, but allowing to reuse the transaction

pub fn rollback(self) -> Result<(), FbError>[src]

Rollback the current transaction changes

pub fn execute_immediate(&mut self, sql: &str) -> Result<(), FbError>[src]

Execute the statement without returning any row

pub fn prepare(&mut self, sql: &str) -> Result<Statement<'c, C>, FbError>[src]

Prepare a new statement for execute

Trait Implementations

impl<'c, C> Drop for Transaction<'c, C> where
    C: FirebirdClient
[src]

impl<C, '_> Execute for Transaction<'_, C> where
    C: FirebirdClient
[src]

fn execute<P>(&mut self, sql: &str, params: P) -> Result<(), FbError> where
    P: IntoParams
[src]

Prepare and execute the sql query

Use () for no parameters or a tuple of parameters

impl<'c, C> Queryable for Transaction<'c, C> where
    C: FirebirdClient
[src]

fn query_iter<'a, P, R>(
    &'a mut self,
    sql: &str,
    params: P
) -> Result<Box<dyn Iterator<Item = Result<R, FbError>> + 'a>, FbError> where
    P: IntoParams,
    R: FromRow + 'static, 
[src]

Prepare, execute and return the rows of the sql query

Use () for no parameters or a tuple of parameters

Auto Trait Implementations

impl<'c, C> !RefUnwindSafe for Transaction<'c, C>

impl<'c, C> !Send for Transaction<'c, C>

impl<'c, C> !Sync for Transaction<'c, C>

impl<'c, C> Unpin for Transaction<'c, C> where
    <C as FirebirdClient>::TrHandle: Unpin

impl<'c, C> !UnwindSafe for Transaction<'c, C>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.