[−][src]Trait rsfbclient::Queryable
Implemented for types that can be used to execute sql queries
Required methods
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,
&'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
Use ()
for no parameters or a tuple of parameters
Provided methods
fn query<'a, P, R>(
&'a mut self,
sql: &str,
params: P
) -> Result<Vec<R>, FbError> where
P: IntoParams,
R: FromRow + 'static,
&'a 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
Use ()
for no parameters or a tuple of parameters
fn query_first<'a, P, R>(
&'a mut self,
sql: &str,
params: P
) -> Result<Option<R>, FbError> where
P: IntoParams,
R: FromRow + 'static,
&'a 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
Use ()
for no parameters or a tuple of parameters
Implementors
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
impl<C> Queryable for Connection<C> where
C: FirebirdClient,
[src]
C: FirebirdClient,