Struct SelectStatement

Source
pub struct SelectStatement<S, Q> { /* private fields */ }

Implementations§

Source§

impl<S: Selectable, Q> SelectStatement<S, Q>

Source

pub fn new(from: S, query: Q) -> Self

Trait Implementations§

Source§

impl<S: Clone, Q: Clone> Clone for SelectStatement<S, Q>

Source§

fn clone(&self) -> SelectStatement<S, Q>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'c, 'out, E, S> Fetch<'c, 'out, E> for SelectStatement<S, WildCard>
where E: Executor<'c> + 'out, S: Selectable, S::Table: for<'r> FromRow<'r, <E::Database as Database>::Row>,

Source§

type Output = <S as Selectable>::Table

Source§

fn fetch_one( &self, exec: E, ) -> Pin<Box<dyn Future<Output = Result<Self::Output, Error>> + Send + 'out>>

Source§

fn fetch_optional( &self, exec: E, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Output>, Error>> + Send + 'out>>

Source§

impl<S, Q> Select for SelectStatement<S, Q>

Source§

impl<S, Q> ToSql for SelectStatement<S, Q>

Source§

fn write_sql_unchecked(&self, sql: &mut String)

Source§

fn write_sql(&self, sql: &mut String)
where Self: CheckedSql,

Source§

fn to_sql_unchecked(&self) -> String

Source§

fn to_sql(&self) -> String
where Self: CheckedSql,

Source§

impl<S, Q> CheckedSql for SelectStatement<S, Q>

Source§

impl<S: Copy, Q: Copy> Copy for SelectStatement<S, Q>

Auto Trait Implementations§

§

impl<S, Q> Freeze for SelectStatement<S, Q>
where S: Freeze, Q: Freeze,

§

impl<S, Q> RefUnwindSafe for SelectStatement<S, Q>

§

impl<S, Q> Send for SelectStatement<S, Q>
where S: Send, Q: Send,

§

impl<S, Q> Sync for SelectStatement<S, Q>
where S: Sync, Q: Sync,

§

impl<S, Q> Unpin for SelectStatement<S, Q>
where S: Unpin, Q: Unpin,

§

impl<S, Q> UnwindSafe for SelectStatement<S, Q>
where S: UnwindSafe, Q: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<S> Filterable for S
where S: Select,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Query for T

Source§

fn prepare<F, S>(name: &str, f: F) -> Prepare<'_, Self, S>
where Self: Binding, F: FnOnce(Self::Bindings) -> S, S: ToSql,

Examples Read more
Source§

fn select(self) -> SelectStatement<Self, WildCard>
where Self: Selectable,

Examples Read more
Source§

fn query<Q>(self, query: Q) -> SelectStatement<Self, Q>
where Self: Selectable, Q: WriteQueryable,

Examples Read more
Source§

fn count<F, T>(self, f: F) -> SelectStatement<Self, Count<T>>
where Self: Selectable, F: FnOnce(Self::Fields) -> T, Count<T>: WriteQueryable,

Examples Read more
Source§

fn insert<I>(self, value: I) -> InsertStatement<Self::Table, I>
where Self: TableQueryable, I: Insertable,

Source§

fn insert_values<I>(self, values: I) -> InsertStatement<Self::Table, Values<I>>

Source§

fn insert_select<S, I>( self, select: S, ) -> InsertStatement<Self::Table, InsertSelect<S, I>>
where Self: TableQueryable, S: Select, I: Insertable,

Source§

fn update<F, S>(self, f: F) -> Update<Self::Table, S>
where Self: TableQueryable, F: FnOnce(<Self::Table as Table>::Fields) -> S, S: UpdateSet,

Source§

fn delete(self) -> Delete<Self::Table>
where Self: TableQueryable,

Source§

fn filter<F, P>(self, f: F) -> Filter<Self, P>
where Self: Filterable, F: FnOnce(Self::Fields) -> P,

Source§

fn and<P>(self, predicate: P) -> And<Self, P>
where Self: Predicate, P: Predicate,

Source§

fn or<P>(self, predicate: P) -> Or<Self, P>
where Self: Predicate, P: Predicate,

Source§

fn group_by<F, O>(self, f: F) -> GroupBy<Self, O>
where Self: Select, F: FnOnce(<Self::Selectable as Selectable>::Fields) -> O, O: GroupOrder,

Examples Read more
Source§

fn order_by<F, O>(self, f: F) -> OrderBy<Self, O>
where Self: Select, F: FnOnce(<Self::Selectable as Selectable>::Fields) -> O, O: Order,

Examples Read more
Source§

fn limit(self, limit: usize) -> Limit<Self>
where Self: Select,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.