[−][src]Struct rsfbclient::Connection
A connection to a firebird database
Implementations
impl<C> Connection<C> where
C: FirebirdClient,
[src]
C: FirebirdClient,
pub fn drop_database(self) -> Result<(), FbError>
[src]
Drop the current database
pub fn with_transaction<T>(
&self,
closure: impl FnOnce(&mut Transaction<'_, C>) -> Result<T, FbError>
) -> Result<T, FbError>
[src]
&self,
closure: impl FnOnce(&mut Transaction<'_, C>) -> Result<T, FbError>
) -> Result<T, FbError>
Run a closure with a transaction, if the closure returns an error the transaction will rollback, else it will be committed
pub fn close(self) -> Result<(), FbError>
[src]
Close the current connection
Trait Implementations
impl<C> Drop for Connection<C> where
C: FirebirdClient,
[src]
C: FirebirdClient,
impl<C> Execute for Connection<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, execute and commit the sql query
Use ()
for no parameters or a tuple of parameters
impl<C> Queryable for Connection<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, return the rows and commit 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> !RefUnwindSafe for Connection<C>
impl<C> Send for Connection<C> where
<C as FirebirdClient>::DbHandle: Send,
<C as FirebirdClient>::StmtHandle: Send,
<C as FirebirdClient>::DbHandle: Send,
<C as FirebirdClient>::StmtHandle: Send,
impl<C> !Sync for Connection<C>
impl<C> Unpin for Connection<C> where
C: Unpin,
<C as FirebirdClient>::DbHandle: Unpin,
C: Unpin,
<C as FirebirdClient>::DbHandle: Unpin,
impl<C> UnwindSafe for Connection<C> where
C: UnwindSafe,
<C as FirebirdClient>::DbHandle: UnwindSafe,
<C as FirebirdClient>::StmtHandle: RefUnwindSafe,
C: UnwindSafe,
<C as FirebirdClient>::DbHandle: UnwindSafe,
<C as FirebirdClient>::StmtHandle: RefUnwindSafe,
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>,