[−][src]Struct rsfbclient::Transaction
Implementations
impl<'c, C> Transaction<'c, C> where
C: FirebirdClient,
[src]
C: FirebirdClient,
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]
C: FirebirdClient,
impl<C, '_> Execute for Transaction<'_, C> where
C: FirebirdClient,
[src]
C: FirebirdClient,
fn execute<P>(&mut self, sql: &str, params: P) -> Result<(), FbError> where
P: IntoParams,
[src]
P: IntoParams,
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]
C: FirebirdClient,
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]
&'a mut self,
sql: &str,
params: P
) -> Result<Box<dyn Iterator<Item = Result<R, FbError>> + 'a>, FbError> where
P: IntoParams,
R: FromRow + 'static,
Prepare, execute and return the rows of the sql query
Use ()
for no parameters or a tuple of parameters
fn query<'a, P, R>(
&'a mut self,
sql: &str,
params: P
) -> Result<Vec<R>, FbError> where
P: IntoParams,
R: FromRow + 'static,
[src]
&'a mut self,
sql: &str,
params: P
) -> Result<Vec<R>, FbError> where
P: IntoParams,
R: FromRow + 'static,
fn query_first<'a, P, R>(
&'a mut self,
sql: &str,
params: P
) -> Result<Option<R>, FbError> where
P: IntoParams,
R: FromRow + 'static,
[src]
&'a mut self,
sql: &str,
params: P
) -> Result<Option<R>, FbError> where
P: IntoParams,
R: FromRow + 'static,
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,
<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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,