pub struct QueryWithParams<Q, P> {
pub query: Q,
pub params: P,
}
Expand description
Representation of a prepared statement query.
See BinQuery
for details.
Fields§
§query: Q
§params: P
Trait Implementations§
Source§impl<Q, I, P> BatchQuery for QueryWithParams<Q, I>where
Q: StatementLike,
I: IntoIterator<Item = P> + Send,
I::IntoIter: Send,
P: Into<Params> + Send,
impl<Q, I, P> BatchQuery for QueryWithParams<Q, I>where
Q: StatementLike,
I: IntoIterator<Item = P> + Send,
I::IntoIter: Send,
P: Into<Params> + Send,
Source§impl<Q: Clone, P: Clone> Clone for QueryWithParams<Q, P>
impl<Q: Clone, P: Clone> Clone for QueryWithParams<Q, P>
Source§fn clone(&self) -> QueryWithParams<Q, P>
fn clone(&self) -> QueryWithParams<Q, P>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Q, P> Query for QueryWithParams<Q, P>
impl<Q, P> Query for QueryWithParams<Q, P>
Source§type Protocol = BinaryProtocol
type Protocol = BinaryProtocol
Query protocol.
Source§fn run<'a, 't: 'a, C>(
self,
conn: C,
) -> BoxFuture<'a, Result<QueryResult<'a, 't, BinaryProtocol>>>where
Self: 'a,
C: ToConnection<'a, 't> + 'a,
fn run<'a, 't: 'a, C>(
self,
conn: C,
) -> BoxFuture<'a, Result<QueryResult<'a, 't, BinaryProtocol>>>where
Self: 'a,
C: ToConnection<'a, 't> + 'a,
This method corresponds to
Queryable::query_iter
.Source§fn first<'a, 't: 'a, T, C>(self, conn: C) -> BoxFuture<'a, Result<Option<T>>>
fn first<'a, 't: 'a, T, C>(self, conn: C) -> BoxFuture<'a, Result<Option<T>>>
This methods corresponds to
Queryable::query_first
.Source§fn fetch<'a, 't: 'a, T, C>(self, conn: C) -> BoxFuture<'a, Result<Vec<T>>>
fn fetch<'a, 't: 'a, T, C>(self, conn: C) -> BoxFuture<'a, Result<Vec<T>>>
This methods corresponds to
Queryable::query
.Source§fn reduce<'a, 't: 'a, T, U, F, C>(
self,
conn: C,
init: U,
next: F,
) -> BoxFuture<'a, Result<U>>
fn reduce<'a, 't: 'a, T, U, F, C>( self, conn: C, init: U, next: F, ) -> BoxFuture<'a, Result<U>>
This methods corresponds to
Queryable::query_fold
.Source§fn map<'a, 't: 'a, T, U, F, C>(
self,
conn: C,
map: F,
) -> BoxFuture<'a, Result<Vec<U>>>
fn map<'a, 't: 'a, T, U, F, C>( self, conn: C, map: F, ) -> BoxFuture<'a, Result<Vec<U>>>
This methods corresponds to
Queryable::query_map
.Source§fn stream<'a, 't: 'a, T, C>(
self,
conn: C,
) -> BoxFuture<'a, Result<ResultSetStream<'a, 'a, 't, T, Self::Protocol>>>
fn stream<'a, 't: 'a, T, C>( self, conn: C, ) -> BoxFuture<'a, Result<ResultSetStream<'a, 'a, 't, T, Self::Protocol>>>
Returns a stream over the first result set. Read more
Source§fn ignore<'a, 't: 'a, C>(self, conn: C) -> BoxFuture<'a, Result<()>>where
Self: 'a,
C: ToConnection<'a, 't> + 'a,
fn ignore<'a, 't: 'a, C>(self, conn: C) -> BoxFuture<'a, Result<()>>where
Self: 'a,
C: ToConnection<'a, 't> + 'a,
This method corresponds to
Queryable::query_drop
.impl<Q: Eq, P: Eq> Eq for QueryWithParams<Q, P>
impl<Q, P> StructuralPartialEq for QueryWithParams<Q, P>
Auto Trait Implementations§
impl<Q, P> Freeze for QueryWithParams<Q, P>
impl<Q, P> RefUnwindSafe for QueryWithParams<Q, P>where
Q: RefUnwindSafe,
P: RefUnwindSafe,
impl<Q, P> Send for QueryWithParams<Q, P>
impl<Q, P> Sync for QueryWithParams<Q, P>
impl<Q, P> Unpin for QueryWithParams<Q, P>
impl<Q, P> UnwindSafe for QueryWithParams<Q, P>where
Q: UnwindSafe,
P: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.