Trait mysql_async::prelude::Queryable [−][src]
Methods of this trait are used to execute database queries.
Conn
is a Queryable
as well as Transaction
.
Required methods
fn ping(&mut self) -> BoxFuture<'_, ()>ⓘ
[src]
Executes COM_PING
.
fn query_iter<'a, Q>(
&'a mut self,
query: Q
) -> BoxFuture<'a, QueryResult<'a, 'static, TextProtocol>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
[src]
&'a mut self,
query: Q
) -> BoxFuture<'a, QueryResult<'a, 'static, TextProtocol>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
Performs the given query and returns the result.
fn prep<'a, Q>(&'a mut self, query: Q) -> BoxFuture<'a, Statement>ⓘ where
Q: AsRef<str> + Sync + Send + 'a,
[src]
Q: AsRef<str> + Sync + Send + 'a,
Prepares the given statement.
Note, that Statement
will exist only in the context of this queryable.
Also note, that this call may close the least recently used statement
if statement cache is at its capacity (see. stmt_cache_size
).
fn close(&mut self, stmt: Statement) -> BoxFuture<'_, ()>ⓘ
[src]
Closes the given statement.
Usually there is no need to explicitly close statements
(see. stmt_cache_size
).
fn exec_iter<'a: 's, 's, Q, P>(
&'a mut self,
stmt: Q,
params: P
) -> BoxFuture<'s, QueryResult<'a, 'static, BinaryProtocol>>ⓘ where
Q: StatementLike + 'a,
P: Into<Params>,
[src]
&'a mut self,
stmt: Q,
params: P
) -> BoxFuture<'s, QueryResult<'a, 'static, BinaryProtocol>>ⓘ where
Q: StatementLike + 'a,
P: Into<Params>,
Executes the given statement with given params.
It'll prepare stmt
, if necessary.
fn query<'a, T, Q>(&'a mut self, query: Q) -> BoxFuture<'a, Vec<T>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
[src]
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
Performs the given query and collects the first result set.
fn query_first<'a, T, Q>(&'a mut self, query: Q) -> BoxFuture<'a, Option<T>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
[src]
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
Performs the given query and returns the first row of the first result set.
fn query_map<'a, T, F, Q, U>(
&'a mut self,
query: Q,
f: F
) -> BoxFuture<'a, Vec<U>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
F: FnMut(T) -> U + Send + 'a,
U: Send,
[src]
&'a mut self,
query: Q,
f: F
) -> BoxFuture<'a, Vec<U>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
F: FnMut(T) -> U + Send + 'a,
U: Send,
Performs the given query and maps each row of the first result set.
fn query_fold<'a, T, F, Q, U>(
&'a mut self,
query: Q,
init: U,
f: F
) -> BoxFuture<'a, U>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
F: FnMut(U, T) -> U + Send + 'a,
U: Send + 'a,
[src]
&'a mut self,
query: Q,
init: U,
f: F
) -> BoxFuture<'a, U>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
F: FnMut(U, T) -> U + Send + 'a,
U: Send + 'a,
Performs the given query and folds the first result set to a single value.
fn query_drop<'a, Q>(&'a mut self, query: Q) -> BoxFuture<'a, ()>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
[src]
Q: AsRef<str> + Send + Sync + 'a,
Performs the given query and drops the query result.
fn exec_batch<'a: 'b, 'b, S, P, I>(
&'a mut self,
stmt: S,
params_iter: I
) -> BoxFuture<'b, ()>ⓘ where
S: StatementLike + 'b,
I: IntoIterator<Item = P> + Send + 'b,
I::IntoIter: Send,
P: Into<Params> + Send,
[src]
&'a mut self,
stmt: S,
params_iter: I
) -> BoxFuture<'b, ()>ⓘ where
S: StatementLike + 'b,
I: IntoIterator<Item = P> + Send + 'b,
I::IntoIter: Send,
P: Into<Params> + Send,
Exectues the given statement for each item in the given params iterator.
It'll prepare stmt
(once), if necessary.
fn exec<'a: 'b, 'b, T, S, P>(
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, Vec<T>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
[src]
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, Vec<T>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
Exectues the given statement and collects the first result set.
It'll prepare stmt
, if necessary.
fn exec_first<'a: 'b, 'b, T, S, P>(
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, Option<T>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
[src]
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, Option<T>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
Exectues the given statement and returns the first row of the first result set.
It'll prepare stmt
, if necessary.
fn exec_map<'a: 'b, 'b, T, S, P, U, F>(
&'a mut self,
stmt: S,
params: P,
f: F
) -> BoxFuture<'b, Vec<U>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
F: FnMut(T) -> U + Send + 'a,
U: Send + 'a,
[src]
&'a mut self,
stmt: S,
params: P,
f: F
) -> BoxFuture<'b, Vec<U>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
F: FnMut(T) -> U + Send + 'a,
U: Send + 'a,
Exectues the given stmt and maps each row of the first result set.
It'll prepare stmt
, if necessary.
fn exec_fold<'a: 'b, 'b, T, S, P, U, F>(
&'a mut self,
stmt: S,
params: P,
init: U,
f: F
) -> BoxFuture<'b, U>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
F: FnMut(U, T) -> U + Send + 'a,
U: Send + 'a,
[src]
&'a mut self,
stmt: S,
params: P,
init: U,
f: F
) -> BoxFuture<'b, U>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
F: FnMut(U, T) -> U + Send + 'a,
U: Send + 'a,
Exectues the given stmt and folds the first result set to a signel value.
It'll prepare stmt
, if necessary.
fn exec_drop<'a: 'b, 'b, S, P>(
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, ()>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
[src]
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, ()>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
Exectues the given statement and drops the result.
Implementors
impl Queryable for Conn
[src]
fn ping(&mut self) -> BoxFuture<'_, ()>ⓘ
[src]
fn query_iter<'a, Q>(
&'a mut self,
query: Q
) -> BoxFuture<'a, QueryResult<'a, 'static, TextProtocol>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
[src]
&'a mut self,
query: Q
) -> BoxFuture<'a, QueryResult<'a, 'static, TextProtocol>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
fn prep<'a, Q>(&'a mut self, query: Q) -> BoxFuture<'a, Statement>ⓘ where
Q: AsRef<str> + Sync + Send + 'a,
[src]
Q: AsRef<str> + Sync + Send + 'a,
fn close(&mut self, stmt: Statement) -> BoxFuture<'_, ()>ⓘ
[src]
fn exec_iter<'a: 's, 's, Q, P>(
&'a mut self,
stmt: Q,
params: P
) -> BoxFuture<'s, QueryResult<'a, 'static, BinaryProtocol>>ⓘ where
Q: StatementLike + 'a,
P: Into<Params>,
[src]
&'a mut self,
stmt: Q,
params: P
) -> BoxFuture<'s, QueryResult<'a, 'static, BinaryProtocol>>ⓘ where
Q: StatementLike + 'a,
P: Into<Params>,
fn query<'a, T, Q>(&'a mut self, query: Q) -> BoxFuture<'a, Vec<T>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
[src]
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
fn query_first<'a, T, Q>(&'a mut self, query: Q) -> BoxFuture<'a, Option<T>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
[src]
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
fn query_map<'a, T, F, Q, U>(
&'a mut self,
query: Q,
mut f: F
) -> BoxFuture<'a, Vec<U>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
F: FnMut(T) -> U + Send + 'a,
U: Send,
[src]
&'a mut self,
query: Q,
mut f: F
) -> BoxFuture<'a, Vec<U>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
F: FnMut(T) -> U + Send + 'a,
U: Send,
fn query_fold<'a, T, F, Q, U>(
&'a mut self,
query: Q,
init: U,
mut f: F
) -> BoxFuture<'a, U>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
F: FnMut(U, T) -> U + Send + 'a,
U: Send + 'a,
[src]
&'a mut self,
query: Q,
init: U,
mut f: F
) -> BoxFuture<'a, U>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
F: FnMut(U, T) -> U + Send + 'a,
U: Send + 'a,
fn query_drop<'a, Q>(&'a mut self, query: Q) -> BoxFuture<'a, ()>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
[src]
Q: AsRef<str> + Send + Sync + 'a,
fn exec_batch<'a: 'b, 'b, S, P, I>(
&'a mut self,
stmt: S,
params_iter: I
) -> BoxFuture<'b, ()>ⓘ where
S: StatementLike + 'b,
I: IntoIterator<Item = P> + Send + 'b,
I::IntoIter: Send,
P: Into<Params> + Send,
[src]
&'a mut self,
stmt: S,
params_iter: I
) -> BoxFuture<'b, ()>ⓘ where
S: StatementLike + 'b,
I: IntoIterator<Item = P> + Send + 'b,
I::IntoIter: Send,
P: Into<Params> + Send,
fn exec<'a: 'b, 'b, T, S, P>(
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, Vec<T>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
[src]
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, Vec<T>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
fn exec_first<'a: 'b, 'b, T, S, P>(
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, Option<T>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
[src]
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, Option<T>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
fn exec_map<'a: 'b, 'b, T, S, P, U, F>(
&'a mut self,
stmt: S,
params: P,
mut f: F
) -> BoxFuture<'b, Vec<U>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
F: FnMut(T) -> U + Send + 'a,
U: Send + 'a,
[src]
&'a mut self,
stmt: S,
params: P,
mut f: F
) -> BoxFuture<'b, Vec<U>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
F: FnMut(T) -> U + Send + 'a,
U: Send + 'a,
fn exec_fold<'a: 'b, 'b, T, S, P, U, F>(
&'a mut self,
stmt: S,
params: P,
init: U,
mut f: F
) -> BoxFuture<'b, U>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
F: FnMut(U, T) -> U + Send + 'a,
U: Send + 'a,
[src]
&'a mut self,
stmt: S,
params: P,
init: U,
mut f: F
) -> BoxFuture<'b, U>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
F: FnMut(U, T) -> U + Send + 'a,
U: Send + 'a,
fn exec_drop<'a: 'b, 'b, S, P>(
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, ()>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
[src]
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, ()>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
impl Queryable for Transaction<'_>
[src]
fn ping(&mut self) -> BoxFuture<'_, ()>ⓘ
[src]
fn query_iter<'a, Q>(
&'a mut self,
query: Q
) -> BoxFuture<'a, QueryResult<'a, 'static, TextProtocol>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
[src]
&'a mut self,
query: Q
) -> BoxFuture<'a, QueryResult<'a, 'static, TextProtocol>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
fn prep<'a, Q>(&'a mut self, query: Q) -> BoxFuture<'a, Statement>ⓘ where
Q: AsRef<str> + Sync + Send + 'a,
[src]
Q: AsRef<str> + Sync + Send + 'a,
fn close(&mut self, stmt: Statement) -> BoxFuture<'_, ()>ⓘ
[src]
fn exec_iter<'a: 's, 's, Q, P>(
&'a mut self,
stmt: Q,
params: P
) -> BoxFuture<'s, QueryResult<'a, 'static, BinaryProtocol>>ⓘ where
Q: StatementLike + 'a,
P: Into<Params>,
[src]
&'a mut self,
stmt: Q,
params: P
) -> BoxFuture<'s, QueryResult<'a, 'static, BinaryProtocol>>ⓘ where
Q: StatementLike + 'a,
P: Into<Params>,
fn query<'a, T, Q>(&'a mut self, query: Q) -> BoxFuture<'a, Vec<T>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
[src]
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
fn query_first<'a, T, Q>(&'a mut self, query: Q) -> BoxFuture<'a, Option<T>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
[src]
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
fn query_map<'a, T, F, Q, U>(
&'a mut self,
query: Q,
f: F
) -> BoxFuture<'a, Vec<U>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
F: FnMut(T) -> U + Send + 'a,
U: Send,
[src]
&'a mut self,
query: Q,
f: F
) -> BoxFuture<'a, Vec<U>>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
F: FnMut(T) -> U + Send + 'a,
U: Send,
fn query_fold<'a, T, F, Q, U>(
&'a mut self,
query: Q,
init: U,
f: F
) -> BoxFuture<'a, U>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
F: FnMut(U, T) -> U + Send + 'a,
U: Send + 'a,
[src]
&'a mut self,
query: Q,
init: U,
f: F
) -> BoxFuture<'a, U>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
T: FromRow + Send + 'static,
F: FnMut(U, T) -> U + Send + 'a,
U: Send + 'a,
fn query_drop<'a, Q>(&'a mut self, query: Q) -> BoxFuture<'a, ()>ⓘ where
Q: AsRef<str> + Send + Sync + 'a,
[src]
Q: AsRef<str> + Send + Sync + 'a,
fn exec_batch<'a: 'b, 'b, S, P, I>(
&'a mut self,
stmt: S,
params_iter: I
) -> BoxFuture<'b, ()>ⓘ where
S: StatementLike + 'b,
I: IntoIterator<Item = P> + Send + 'b,
I::IntoIter: Send,
P: Into<Params> + Send,
[src]
&'a mut self,
stmt: S,
params_iter: I
) -> BoxFuture<'b, ()>ⓘ where
S: StatementLike + 'b,
I: IntoIterator<Item = P> + Send + 'b,
I::IntoIter: Send,
P: Into<Params> + Send,
fn exec<'a: 'b, 'b, T, S, P>(
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, Vec<T>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
[src]
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, Vec<T>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
fn exec_first<'a: 'b, 'b, T, S, P>(
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, Option<T>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
[src]
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, Option<T>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
fn exec_map<'a: 'b, 'b, T, S, P, U, F>(
&'a mut self,
stmt: S,
params: P,
f: F
) -> BoxFuture<'b, Vec<U>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
F: FnMut(T) -> U + Send + 'a,
U: Send + 'a,
[src]
&'a mut self,
stmt: S,
params: P,
f: F
) -> BoxFuture<'b, Vec<U>>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
F: FnMut(T) -> U + Send + 'a,
U: Send + 'a,
fn exec_fold<'a: 'b, 'b, T, S, P, U, F>(
&'a mut self,
stmt: S,
params: P,
init: U,
f: F
) -> BoxFuture<'b, U>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
F: FnMut(U, T) -> U + Send + 'a,
U: Send + 'a,
[src]
&'a mut self,
stmt: S,
params: P,
init: U,
f: F
) -> BoxFuture<'b, U>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
T: FromRow + Send + 'static,
F: FnMut(U, T) -> U + Send + 'a,
U: Send + 'a,
fn exec_drop<'a: 'b, 'b, S, P>(
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, ()>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,
[src]
&'a mut self,
stmt: S,
params: P
) -> BoxFuture<'b, ()>ⓘ where
S: StatementLike + 'b,
P: Into<Params> + Send + 'b,