[][src]Trait diesel::query_builder::Query

pub trait Query {
    type SqlType;
}

A complete SQL query with a return type.

This can be a select statement, or a command such as update or insert with a RETURNING clause. Unlike Expression, types implementing this trait are guaranteed to be executable on their own.

A type which doesn't implement this trait may still represent a complete SQL query. For example, an INSERT statement without a RETURNING clause will not implement this trait, but can still be executed.

Associated Types

type SqlType

The SQL type that this query represents.

This is the SQL type of the SELECT clause for select statements, and the SQL type of the RETURNING clause for insert, update, or delete statements.

Loading content...

Implementations on Foreign Types

impl<'a, T: Query> Query for &'a T[src]

type SqlType = T::SqlType

Loading content...

Implementors

impl<DB, Q, '_> Query for BoxedSqlQuery<'_, DB, Q> where
    DB: Backend
[src]

impl<Inner> Query for SqlQuery<Inner>[src]

impl<Q, Value> Query for UncheckedBind<Q, Value> where
    Q: Query
[src]

type SqlType = Q::SqlType

impl<ST, T> Query for SqlLiteral<ST, T> where
    Self: Expression
[src]

type SqlType = ST

impl<T, U, Op, Ret> Query for InsertStatement<T, U, Op, ReturningClause<Ret>> where
    Ret: Expression + SelectableExpression<T> + NonAggregate
[src]

type SqlType = Ret::SqlType

impl<T, U, Ret> Query for DeleteStatement<T, U, ReturningClause<Ret>> where
    T: Table,
    Ret: SelectableExpression<T>, 
[src]

type SqlType = Ret::SqlType

impl<T, U, V, Ret> Query for UpdateStatement<T, U, V, ReturningClause<Ret>> where
    T: Table,
    Ret: Expression + SelectableExpression<T> + ValidGrouping<()>,
    Ret::IsAggregate: MixedAggregates<No, Output = No>, 
[src]

type SqlType = Ret::SqlType

Loading content...