#[non_exhaustive]
pub struct BoxedSelectStatement<'a, ST, QS, DB, GB = ()> { pub select: Box<dyn QueryFragment<DB> + Send + 'a>, pub from: QS, pub distinct: Box<dyn QueryFragment<DB> + Send + 'a>, pub where_clause: BoxedWhereClause<'a, DB>, pub order: Option<Box<dyn QueryFragment<DB> + Send + 'a>>, pub limit_offset: BoxedLimitOffsetClause<'a, DB>, pub group_by: Box<dyn QueryFragment<DB> + Send + 'a>, pub having: Box<dyn QueryFragment<DB> + Send + 'a>, /* private fields */ }
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Expand description

This type represents a boxed select query

Using this type directly is only meaningful for custom backends that need to provide a custom QueryFragment implementation

Fields (Non-exhaustive)

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
select: Box<dyn QueryFragment<DB> + Send + 'a>

The select clause of the query

from: QS

The from clause of the query

distinct: Box<dyn QueryFragment<DB> + Send + 'a>

The distinct clause of the query

where_clause: BoxedWhereClause<'a, DB>

The where clause of the query

order: Option<Box<dyn QueryFragment<DB> + Send + 'a>>

The order clause of the query

limit_offset: BoxedLimitOffsetClause<'a, DB>

The combined limit/offset clause of the query

group_by: Box<dyn QueryFragment<DB> + Send + 'a>

The group by clause of the query

having: Box<dyn QueryFragment<DB> + Send + 'a>

The having clause of the query

Trait Implementations

Type of the expression returned by AsInExpression::as_in_expression
Construct the diesel query dsl representation of the IN (values) clause for the given type Read more
What kind of query does this type represent?
Combine two queries using a SQL UNION Read more
Combine two queries using a SQL UNION ALL
Combine two queries using a SQL INTERSECT
Combine two queries using a SQL INTERSECT ALL
Combine two queries using a SQL EXCEPT
Combine two queries using a SQL EXCEPT ALL
The type returned by .distinct
See the trait documentation.
The type returned by .filter.
See the trait documentation.
The type returned by .having.
See the trait documentation.
The VALUES clause to insert these records Read more
Construct Self::Values Read more
Insert self into a given table. Read more
The VALUES clause to insert these records Read more
Construct Self::Values Read more
Insert self into a given table. Read more
The type returned by .limit
See the trait documentation
The type returned by .offset.
See the trait documentation
The type returned by .filter.
See the trait documentation.
The type returned by .order.
See the trait documentation.
The SQL type that this query represents. Read more
Available on crate feature postgres only.
Adds the DISTINCT ON clause to a query. Read more
Adds a SELECT clause to the query. Read more
Join two tables using a SQL INNER JOIN. Read more
Join two tables using a SQL LEFT OUTER JOIN. Read more
Adds to the WHERE clause of a query. Read more
Adds to the WHERE clause of a query using OR Read more
Attempts to find a single record from the given table by primary key. Read more
Sets the order clause of a query. Read more
Alias for order
Appends to the ORDER BY clause of this SQL query. Read more
Sets the group by clause of a query. Read more
Adds to the HAVING clause of a query. Read more
Boxes the pieces of a query into a single type. Read more
Walk over this QueryFragment for all passes. Read more
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Converts this QueryFragment to its SQL representation. Read more
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Serializes all bind parameters in this query. Read more
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Is this query safe to store in the prepared statement cache? Read more
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Does walking this AST have any effect?
A type which uniquely represents Self in a SQL query. Read more
Can the SQL generated by Self be uniquely identified by its type? Read more
Returns the type id of Self::QueryId if Self::HAS_STATIC_QUERY_ID. Returns None otherwise. Read more
Executes the given query, returning a Vec with the returned rows. Read more
Executes the given query, returning an Iterator with the returned rows. Read more
Runs the command, and returns the affected row. Read more
Runs the command, returning an Vec with the affected rows. Read more
The type returned by .select
See the trait documentation
The return type of nullable
See the trait documentation
The SQL type of the SELECT clause
The type returned by .then_order_by.
See the trait documentation.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
The SQL type of Self::Query
What kind of query does this type represent?
Converts a type which semantically represents a SQL query into the actual query being executed. See the trait level docs for more. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Execute this command

Returns the argument unchanged.

Calls U::from(self).

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

Convert self to an expression for Diesel’s query builder. Read more
Convert &self to an expression for Diesel’s query builder. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.