Struct rust_query::Query
source · pub struct Query<'inner> { /* private fields */ }
Expand description
This is the base type for other query types like GroupQuery and Exec. It contains most query functionality like joining tables and doing sub-queries.
Implementations§
source§impl<'inner> Query<'inner>
impl<'inner> Query<'inner>
sourcepub fn table<T: HasId>(&mut self, t: T) -> Db<'inner, T>
pub fn table<T: HasId>(&mut self, t: T) -> Db<'inner, T>
Join a table, this is like Iterator::flat_map but for queries.
sourcepub fn flat_table<T: Table>(&mut self, t: T) -> T::Dummy<'inner>
pub fn flat_table<T: Table>(&mut self, t: T) -> T::Dummy<'inner>
Join a table that has no integer primary key. Refer to Query::table for more information about joining tables.
sourcepub fn query<F, R>(&self, f: F) -> Rwhere
F: for<'a> FnOnce(&'a mut GroupQuery<'inner, 'a>) -> R,
pub fn query<F, R>(&self, f: F) -> Rwhere
F: for<'a> FnOnce(&'a mut GroupQuery<'inner, 'a>) -> R,
Perform a sub-query that returns a single result for each of the current rows.
Auto Trait Implementations§
impl<'inner> Freeze for Query<'inner>
impl<'inner> !RefUnwindSafe for Query<'inner>
impl<'inner> !Send for Query<'inner>
impl<'inner> !Sync for Query<'inner>
impl<'inner> !Unpin for Query<'inner>
impl<'inner> !UnwindSafe for Query<'inner>
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