pub struct Query<'val, SQL, Exe, R> { /* private fields */ }Expand description
The query API.
Implementations§
Source§impl<'val, SQL, Exe, R> Query<'val, SQL, Exe, R>where
Exe: Executor,
impl<'val, SQL, Exe, R> Query<'val, SQL, Exe, R>where
Exe: Executor,
Sourcepub fn fetch(self) -> FetchStream<'val, SQL, Exe::Future, Exe::Transport, R>
pub fn fetch(self) -> FetchStream<'val, SQL, Exe::Future, Exe::Transport, R>
Fetch rows using Stream api.
The returned Stream must be polled/awaited until completion,
otherwise it will disturb subsequent query.
Sourcepub fn fetch_all(self) -> FetchAll<'val, SQL, Exe::Future, Exe::Transport, R>
pub fn fetch_all(self) -> FetchAll<'val, SQL, Exe::Future, Exe::Transport, R>
Fetch all rows into Vec.
Sourcepub fn fetch_optional(
self,
) -> FetchOptional<'val, SQL, Exe::Future, Exe::Transport, R>
pub fn fetch_optional( self, ) -> FetchOptional<'val, SQL, Exe::Future, Exe::Transport, R>
Optionally fetch one row.
Trait Implementations§
Source§impl<'val, SQL, Exe, R> IntoFuture for Query<'val, SQL, Exe, R>
impl<'val, SQL, Exe, R> IntoFuture for Query<'val, SQL, Exe, R>
Source§type IntoFuture = Execute<'val, SQL, <Exe as Executor>::Future, <Exe as Executor>::Transport>
type IntoFuture = Execute<'val, SQL, <Exe as Executor>::Future, <Exe as Executor>::Transport>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<'val, SQL, Exe, R> Freeze for Query<'val, SQL, Exe, R>
impl<'val, SQL, Exe, R> RefUnwindSafe for Query<'val, SQL, Exe, R>
impl<'val, SQL, Exe, R> Send for Query<'val, SQL, Exe, R>
impl<'val, SQL, Exe, R> Sync for Query<'val, SQL, Exe, R>
impl<'val, SQL, Exe, R> Unpin for Query<'val, SQL, Exe, R>
impl<'val, SQL, Exe, R> UnsafeUnpin for Query<'val, SQL, Exe, R>where
SQL: UnsafeUnpin,
Exe: UnsafeUnpin,
impl<'val, SQL, Exe, R> UnwindSafe for Query<'val, SQL, Exe, R>
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