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: PTrait Implementations§
Source§impl<Q, I, P> BatchQuery for QueryWithParams<Q, I>
impl<Q, I, P> BatchQuery for QueryWithParams<Q, I>
Source§impl<Q, P> BinQuery for QueryWithParams<Q, P>
impl<Q, P> BinQuery for QueryWithParams<Q, P>
Source§fn run<'a, 'b, 'c, C>(self, conn: C) -> Result<QueryResult<'a, 'b, 'c, Binary>>
fn run<'a, 'b, 'c, C>(self, conn: C) -> Result<QueryResult<'a, 'b, 'c, Binary>>
This methods corresponds to
Queryable::exec_iter.Source§fn first<'a, 'b, 'c: 'b, T, C>(self, conn: C) -> Result<Option<T>>
fn first<'a, 'b, 'c: 'b, T, C>(self, conn: C) -> Result<Option<T>>
This methods corresponds to
Queryable::exec_first.Source§fn first_opt<'a, 'b, 'c: 'b, T, C>(
self,
conn: C,
) -> Result<Option<StdResult<T, FromRowError>>>
fn first_opt<'a, 'b, 'c: 'b, T, C>( self, conn: C, ) -> Result<Option<StdResult<T, FromRowError>>>
Same as
BinQuery::first but useful when you not sure what your schema is.Source§fn fetch<'a, 'b, 'c: 'b, T, C>(self, conn: C) -> Result<Vec<T>>
fn fetch<'a, 'b, 'c: 'b, T, C>(self, conn: C) -> Result<Vec<T>>
This methods corresponds to
Queryable::exec.Source§fn fetch_opt<'a, 'b, 'c: 'b, T, C>(
self,
conn: C,
) -> Result<Vec<StdResult<T, FromRowError>>>
fn fetch_opt<'a, 'b, 'c: 'b, T, C>( self, conn: C, ) -> Result<Vec<StdResult<T, FromRowError>>>
Same as
BinQuery::fetch but useful when you not sure what your schema is.Source§fn fold<'a, 'b, 'c: 'b, T, U, F, C>(
self,
conn: C,
init: U,
next: F,
) -> Result<U>
fn fold<'a, 'b, 'c: 'b, T, U, F, C>( self, conn: C, init: U, next: F, ) -> Result<U>
This methods corresponds to
Queryable::exec_fold.Source§fn fold_opt<'a, 'b, 'c: 'b, T, U, F, C>(
self,
conn: C,
init: U,
next: F,
) -> Result<U>
fn fold_opt<'a, 'b, 'c: 'b, T, U, F, C>( self, conn: C, init: U, next: F, ) -> Result<U>
Same as
BinQuery::fold but useful when you not sure what your schema is.Source§fn map<'a, 'b, 'c: 'b, T, U, F, C>(self, conn: C, map: F) -> Result<Vec<U>>
fn map<'a, 'b, 'c: 'b, T, U, F, C>(self, conn: C, map: F) -> Result<Vec<U>>
This methods corresponds to
Queryable::exec_map.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 duplicate 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 moreimpl<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