Struct rsfbclient::SimpleConnection
source · pub struct SimpleConnection { /* private fields */ }
Expand description
A connection API without client types
Implementations§
source§impl SimpleConnection
impl SimpleConnection
sourcepub fn drop_database(self) -> Result<(), FbError>
pub fn drop_database(self) -> Result<(), FbError>
Drop the current database
sourcepub fn begin_transaction(&mut self) -> Result<(), FbError>
pub fn begin_transaction(&mut self) -> Result<(), FbError>
Begins a new transaction, and instructs all the query
and execute
methods
performed in the SimpleConnection
type to not automatically commit and rollback
until commit
or rollback
are called
sourcepub fn begin_transaction_config(
&mut self,
confs: TransactionConfiguration,
) -> Result<(), FbError>
pub fn begin_transaction_config( &mut self, confs: TransactionConfiguration, ) -> Result<(), FbError>
Begins a new transaction with a custom transaction configuration, and instructs
all the query
and execute
methods performed in the SimpleConnection
type
to not automatically commit and rollback until commit
or rollback
are called
Trait Implementations§
source§impl Execute for SimpleConnection
impl Execute for SimpleConnection
source§fn execute<P>(&mut self, sql: &str, params: P) -> Result<usize, FbError>where
P: IntoParams,
fn execute<P>(&mut self, sql: &str, params: P) -> Result<usize, FbError>where
P: IntoParams,
Execute a query, may or may not commit the changes
and returns the affected rows count Read more
source§fn execute_returnable<P, R>(
&mut self,
sql: &str,
params: P,
) -> Result<R, FbError>where
P: IntoParams,
R: FromRow + 'static,
fn execute_returnable<P, R>(
&mut self,
sql: &str,
params: P,
) -> Result<R, FbError>where
P: IntoParams,
R: FromRow + 'static,
Execute a query that will return data, like the ‘insert … returning ..’ or ‘execute procedure’. Read more
source§impl From<Connection<NativeFbClient<DynLink>>> for SimpleConnection
impl From<Connection<NativeFbClient<DynLink>>> for SimpleConnection
source§fn from(conn: Connection<NativeFbClient<DynLink>>) -> Self
fn from(conn: Connection<NativeFbClient<DynLink>>) -> Self
Converts to this type from the input type.
source§impl From<Connection<NativeFbClient<DynLoad>>> for SimpleConnection
impl From<Connection<NativeFbClient<DynLoad>>> for SimpleConnection
source§fn from(conn: Connection<NativeFbClient<DynLoad>>) -> Self
fn from(conn: Connection<NativeFbClient<DynLoad>>) -> Self
Converts to this type from the input type.
source§impl From<Connection<RustFbClient>> for SimpleConnection
impl From<Connection<RustFbClient>> for SimpleConnection
source§fn from(conn: Connection<RustFbClient>) -> Self
fn from(conn: Connection<RustFbClient>) -> Self
Converts to this type from the input type.
source§impl Queryable for SimpleConnection
impl Queryable for SimpleConnection
source§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,
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,
Returns the results of the query as an iterator. Read more
source§fn query<P, R>(&mut self, sql: &str, params: P) -> Result<Vec<R>, FbError>where
P: IntoParams,
R: FromRow + 'static,
fn query<P, R>(&mut self, sql: &str, params: P) -> Result<Vec<R>, FbError>where
P: IntoParams,
R: FromRow + 'static,
Returns the results of the query as a
Vec
Read moresource§fn query_first<P, R>(
&mut self,
sql: &str,
params: P,
) -> Result<Option<R>, FbError>where
P: IntoParams,
R: FromRow + 'static,
fn query_first<P, R>(
&mut self,
sql: &str,
params: P,
) -> Result<Option<R>, FbError>where
P: IntoParams,
R: FromRow + 'static,
Returns the first result of the query, or None. Read more
source§impl<F, C> RemoteEventsManager<F, C> for SimpleConnectionwhere
C: FirebirdClient + FirebirdClientDbEvents + 'static,
F: FnMut(&mut SimpleConnection) -> Result<bool, FbError> + Send + Sync + 'static,
SimpleConnection: From<Connection<C>>,
impl<F, C> RemoteEventsManager<F, C> for SimpleConnectionwhere
C: FirebirdClient + FirebirdClientDbEvents + 'static,
F: FnMut(&mut SimpleConnection) -> Result<bool, FbError> + Send + Sync + 'static,
SimpleConnection: From<Connection<C>>,
source§impl TryFrom<SimpleConnection> for Connection<NativeFbClient<DynLink>>
impl TryFrom<SimpleConnection> for Connection<NativeFbClient<DynLink>>
source§impl TryFrom<SimpleConnection> for Connection<NativeFbClient<DynLoad>>
impl TryFrom<SimpleConnection> for Connection<NativeFbClient<DynLoad>>
source§impl TryFrom<SimpleConnection> for Connection<RustFbClient>
impl TryFrom<SimpleConnection> for Connection<RustFbClient>
Auto Trait Implementations§
impl Freeze for SimpleConnection
impl !RefUnwindSafe for SimpleConnection
impl Send for SimpleConnection
impl !Sync for SimpleConnection
impl Unpin for SimpleConnection
impl !UnwindSafe for SimpleConnection
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more