[−][src]Trait diesel::query_builder::AsQuery
Types that can be converted into a complete, typed SQL query.
This is used internally to automatically add the right select clause when
none is specified, or to automatically add RETURNING *
in certain contexts.
A type which implements this trait is guaranteed to be valid for execution.
Associated Types
type SqlType
The SQL type of Self::Query
type Query: Query<SqlType = Self::SqlType>
What kind of query does this type represent?
Required methods
fn as_query(self) -> Self::Query
Converts a type which semantically represents a SQL query into the actual query being executed. See the trait level docs for more.
Implementors
impl<T, U> AsQuery for DeleteStatement<T, U, NoReturningClause> where
T: Table,
T::AllColumns: SelectableExpression<T>,
DeleteStatement<T, U, ReturningClause<T::AllColumns>>: Query,
[src]
T: Table,
T::AllColumns: SelectableExpression<T>,
DeleteStatement<T, U, ReturningClause<T::AllColumns>>: Query,
type SqlType = <Self::Query as Query>::SqlType
type Query = DeleteStatement<T, U, ReturningClause<T::AllColumns>>
fn as_query(self) -> Self::Query
[src]
impl<T, U, Op> AsQuery for InsertStatement<T, U, Op, NoReturningClause> where
T: Table,
InsertStatement<T, U, Op, ReturningClause<T::AllColumns>>: Query,
[src]
T: Table,
InsertStatement<T, U, Op, ReturningClause<T::AllColumns>>: Query,
type SqlType = <Self::Query as Query>::SqlType
type Query = InsertStatement<T, U, Op, ReturningClause<T::AllColumns>>
fn as_query(self) -> Self::Query
[src]
impl<T, U, V> AsQuery for UpdateStatement<T, U, V, NoReturningClause> where
T: Table,
UpdateStatement<T, U, V, ReturningClause<T::AllColumns>>: Query,
[src]
T: Table,
UpdateStatement<T, U, V, ReturningClause<T::AllColumns>>: Query,