Struct diesel::query_source::Alias
source · [−]pub struct Alias<S> { /* private fields */ }
Expand description
Represents an alias within diesel’s query builder
See alias!
for more details.
Implementations
sourceimpl<S: AliasSource> Alias<S>
impl<S: AliasSource> Alias<S>
sourcepub fn field<F>(&self, field: F) -> AliasedField<S, F> where
F: Column<Table = S::Target>,
pub fn field<F>(&self, field: F) -> AliasedField<S, F> where
F: Column<Table = S::Target>,
Maps a single field of the source table in this alias
sourcepub fn fields<Fields>(&self, fields: Fields) -> AliasedFields<S, Fields> where
Fields: FieldAliasMapper<S>,
pub fn fields<Fields>(&self, fields: Fields) -> AliasedFields<S, Fields> where
Fields: FieldAliasMapper<S>,
Maps multiple fields of the source table in this alias (takes in tuples and some expressions)
Trait Implementations
sourceimpl<S, QS> AppearsInFromClause<QS> for Alias<S> where
S: AliasSource,
S::Target: AliasAppearsInFromClause<S, QS>,
impl<S, QS> AppearsInFromClause<QS> for Alias<S> where
S: AliasSource,
S::Target: AliasAppearsInFromClause<S, QS>,
type Count = <<S as AliasSource>::Target as AliasAppearsInFromClause<S, QS>>::Count
type Count = <<S as AliasSource>::Target as AliasAppearsInFromClause<S, QS>>::Count
How many times does Self
appear in QS
?
sourceimpl<S> AsQuery for Alias<S> where
S: AliasSource,
S::Target: AsQuery,
Self: QuerySource,
<Self as QuerySource>::DefaultSelection: ValidGrouping<()>,
impl<S> AsQuery for Alias<S> where
S: AliasSource,
S::Target: AsQuery,
Self: QuerySource,
<Self as QuerySource>::DefaultSelection: ValidGrouping<()>,
type SqlType = <<Alias<S> as QuerySource>::DefaultSelection as Expression>::SqlType
type SqlType = <<Alias<S> as QuerySource>::DefaultSelection as Expression>::SqlType
The SQL type of Self::Query
type Query = SelectStatement<FromClause<Alias<S>>, DefaultSelectClause<FromClause<Alias<S>>>, NoDistinctClause, NoWhereClause, NoOrderClause, LimitOffsetClause<NoLimitClause, NoOffsetClause>, NoGroupByClause, NoHavingClause, NoLockingClause>
type Query = SelectStatement<FromClause<Alias<S>>, DefaultSelectClause<FromClause<Alias<S>>>, NoDistinctClause, NoWhereClause, NoOrderClause, LimitOffsetClause<NoLimitClause, NoOffsetClause>, NoGroupByClause, NoHavingClause, NoLockingClause>
What kind of query does this type represent?
sourceimpl<'a, S, DB> BoxedDsl<'a, DB> for Alias<S> where
Alias<S>: QuerySource + AsQuery<Query = SelectStatement<FromClause<Alias<S>>>>,
SelectStatement<FromClause<Alias<S>>>: BoxedDsl<'a, DB>,
<Alias<S> as QuerySource>::DefaultSelection: Expression<SqlType = <Alias<S> as AsQuery>::SqlType> + ValidGrouping<()>,
<Alias<S> as AsQuery>::SqlType: TypedExpressionType,
impl<'a, S, DB> BoxedDsl<'a, DB> for Alias<S> where
Alias<S>: QuerySource + AsQuery<Query = SelectStatement<FromClause<Alias<S>>>>,
SelectStatement<FromClause<Alias<S>>>: BoxedDsl<'a, DB>,
<Alias<S> as QuerySource>::DefaultSelection: Expression<SqlType = <Alias<S> as AsQuery>::SqlType> + ValidGrouping<()>,
<Alias<S> as AsQuery>::SqlType: TypedExpressionType,
type Output = <SelectStatement<FromClause<Alias<S>>, DefaultSelectClause<FromClause<Alias<S>>>, NoDistinctClause, NoWhereClause, NoOrderClause, LimitOffsetClause<NoLimitClause, NoOffsetClause>, NoGroupByClause, NoHavingClause, NoLockingClause> as BoxedDsl<'a, DB>>::Output
type Output = <SelectStatement<FromClause<Alias<S>>, DefaultSelectClause<FromClause<Alias<S>>>, NoDistinctClause, NoWhereClause, NoOrderClause, LimitOffsetClause<NoLimitClause, NoOffsetClause>, NoGroupByClause, NoHavingClause, NoLockingClause> as BoxedDsl<'a, DB>>::Output
The return type of internal_into_boxed
sourcefn internal_into_boxed(self) -> Self::Output
fn internal_into_boxed(self) -> Self::Output
See the trait documentation.
sourceimpl<S> CombineDsl for Alias<S> where
S: AliasSource,
S::Target: Table,
Self: AsQuery,
impl<S> CombineDsl for Alias<S> where
S: AliasSource,
S::Target: Table,
Self: AsQuery,
sourcefn union<Rhs>(self, rhs: Rhs) -> Union<Self, Rhs> where
Rhs: AsQuery<SqlType = <<Self as AsQuery>::Query as Query>::SqlType>,
fn union<Rhs>(self, rhs: Rhs) -> Union<Self, Rhs> where
Rhs: AsQuery<SqlType = <<Self as AsQuery>::Query as Query>::SqlType>,
Combine two queries using a SQL UNION
Read more
sourcefn union_all<Rhs>(self, rhs: Rhs) -> UnionAll<Self, Rhs> where
Rhs: AsQuery<SqlType = <<Self as AsQuery>::Query as Query>::SqlType>,
fn union_all<Rhs>(self, rhs: Rhs) -> UnionAll<Self, Rhs> where
Rhs: AsQuery<SqlType = <<Self as AsQuery>::Query as Query>::SqlType>,
Combine two queries using a SQL UNION ALL
sourcefn intersect<Rhs>(self, rhs: Rhs) -> Intersect<Self, Rhs> where
Rhs: AsQuery<SqlType = <<Self as AsQuery>::Query as Query>::SqlType>,
fn intersect<Rhs>(self, rhs: Rhs) -> Intersect<Self, Rhs> where
Rhs: AsQuery<SqlType = <<Self as AsQuery>::Query as Query>::SqlType>,
Combine two queries using a SQL INTERSECT
sourcefn intersect_all<Rhs>(self, rhs: Rhs) -> IntersectAll<Self, Rhs> where
Rhs: AsQuery<SqlType = <<Self as AsQuery>::Query as Query>::SqlType>,
fn intersect_all<Rhs>(self, rhs: Rhs) -> IntersectAll<Self, Rhs> where
Rhs: AsQuery<SqlType = <<Self as AsQuery>::Query as Query>::SqlType>,
Combine two queries using a SQL INTERSECT ALL
sourceimpl<S, Selection> DistinctOnDsl<Selection> for Alias<S> where
S: AliasSource,
Selection: SelectableExpression<Self>,
Selection::SqlType: SingleValue,
Self: QuerySource + AsQuery<Query = SelectStatement<FromClause<Self>>>,
SelectStatement<FromClause<Self>>: DistinctOnDsl<Selection>,
<Self as QuerySource>::DefaultSelection: Expression<SqlType = <Self as AsQuery>::SqlType> + ValidGrouping<()>,
<Self as AsQuery>::SqlType: TypedExpressionType,
Available on crate feature postgres_backend
only.
impl<S, Selection> DistinctOnDsl<Selection> for Alias<S> where
S: AliasSource,
Selection: SelectableExpression<Self>,
Selection::SqlType: SingleValue,
Self: QuerySource + AsQuery<Query = SelectStatement<FromClause<Self>>>,
SelectStatement<FromClause<Self>>: DistinctOnDsl<Selection>,
<Self as QuerySource>::DefaultSelection: Expression<SqlType = <Self as AsQuery>::SqlType> + ValidGrouping<()>,
<Self as AsQuery>::SqlType: TypedExpressionType,
postgres_backend
only.type Output = <SelectStatement<FromClause<Alias<S>>, DefaultSelectClause<FromClause<Alias<S>>>, NoDistinctClause, NoWhereClause, NoOrderClause, LimitOffsetClause<NoLimitClause, NoOffsetClause>, NoGroupByClause, NoHavingClause, NoLockingClause> as DistinctOnDsl<Selection>>::Output
type Output = <SelectStatement<FromClause<Alias<S>>, DefaultSelectClause<FromClause<Alias<S>>>, NoDistinctClause, NoWhereClause, NoOrderClause, LimitOffsetClause<NoLimitClause, NoOffsetClause>, NoGroupByClause, NoHavingClause, NoLockingClause> as DistinctOnDsl<Selection>>::Output
The type returned by .distinct_on
sourcefn distinct_on(self, selection: Selection) -> DistinctOn<Self, Selection>
fn distinct_on(self, selection: Selection) -> DistinctOn<Self, Selection>
See the trait documentation
sourceimpl<S, Predicate> FilterDsl<Predicate> for Alias<S> where
Self: AsQuery,
<Self as AsQuery>::Query: FilterDsl<Predicate>,
impl<S, Predicate> FilterDsl<Predicate> for Alias<S> where
Self: AsQuery,
<Self as AsQuery>::Query: FilterDsl<Predicate>,
sourceimpl<S, PK> FindDsl<PK> for Alias<S> where
S: AliasSource,
S::Target: Table,
<S::Target as Table>::PrimaryKey: FieldAliasMapper<S>,
<<S::Target as Table>::PrimaryKey as FieldAliasMapper<S>>::Out: EqAll<PK>,
Self: FilterDsl<<<<S::Target as Table>::PrimaryKey as FieldAliasMapper<S>>::Out as EqAll<PK>>::Output>,
impl<S, PK> FindDsl<PK> for Alias<S> where
S: AliasSource,
S::Target: Table,
<S::Target as Table>::PrimaryKey: FieldAliasMapper<S>,
<<S::Target as Table>::PrimaryKey as FieldAliasMapper<S>>::Out: EqAll<PK>,
Self: FilterDsl<<<<S::Target as Table>::PrimaryKey as FieldAliasMapper<S>>::Out as EqAll<PK>>::Output>,
sourceimpl<S, Expr> GroupByDsl<Expr> for Alias<S> where
Expr: Expression,
Self: QuerySource + AsQuery<Query = SelectStatement<FromClause<Self>>>,
<Self as QuerySource>::DefaultSelection: Expression<SqlType = <Self as AsQuery>::SqlType> + ValidGrouping<()>,
<Self as AsQuery>::SqlType: TypedExpressionType,
impl<S, Expr> GroupByDsl<Expr> for Alias<S> where
Expr: Expression,
Self: QuerySource + AsQuery<Query = SelectStatement<FromClause<Self>>>,
<Self as QuerySource>::DefaultSelection: Expression<SqlType = <Self as AsQuery>::SqlType> + ValidGrouping<()>,
<Self as AsQuery>::SqlType: TypedExpressionType,
type Output = <SelectStatement<FromClause<Alias<S>>, DefaultSelectClause<FromClause<Alias<S>>>, NoDistinctClause, NoWhereClause, NoOrderClause, LimitOffsetClause<NoLimitClause, NoOffsetClause>, NoGroupByClause, NoHavingClause, NoLockingClause> as GroupByDsl<Expr>>::Output
type Output = <SelectStatement<FromClause<Alias<S>>, DefaultSelectClause<FromClause<Alias<S>>>, NoDistinctClause, NoWhereClause, NoOrderClause, LimitOffsetClause<NoLimitClause, NoOffsetClause>, NoGroupByClause, NoHavingClause, NoLockingClause> as GroupByDsl<Expr>>::Output
The type returned by .group_by
sourceimpl<S, Lock> LockingDsl<Lock> for Alias<S> where
Self: QuerySource + AsQuery<Query = SelectStatement<FromClause<Self>>>,
<Self as QuerySource>::DefaultSelection: Expression<SqlType = <Self as AsQuery>::SqlType> + ValidGrouping<()>,
<Self as AsQuery>::SqlType: TypedExpressionType,
impl<S, Lock> LockingDsl<Lock> for Alias<S> where
Self: QuerySource + AsQuery<Query = SelectStatement<FromClause<Self>>>,
<Self as QuerySource>::DefaultSelection: Expression<SqlType = <Self as AsQuery>::SqlType> + ValidGrouping<()>,
<Self as AsQuery>::SqlType: TypedExpressionType,
type Output = <SelectStatement<FromClause<Alias<S>>, DefaultSelectClause<FromClause<Alias<S>>>, NoDistinctClause, NoWhereClause, NoOrderClause, LimitOffsetClause<NoLimitClause, NoOffsetClause>, NoGroupByClause, NoHavingClause, NoLockingClause> as LockingDsl<Lock>>::Output
type Output = <SelectStatement<FromClause<Alias<S>>, DefaultSelectClause<FromClause<Alias<S>>>, NoDistinctClause, NoWhereClause, NoOrderClause, LimitOffsetClause<NoLimitClause, NoOffsetClause>, NoGroupByClause, NoHavingClause, NoLockingClause> as LockingDsl<Lock>>::Output
The type returned by set_lock
. See dsl::ForUpdate
and friends for
convenient access to this type. Read more
sourceimpl<S, Predicate> OrFilterDsl<Predicate> for Alias<S> where
Self: AsQuery,
<Self as AsQuery>::Query: OrFilterDsl<Predicate>,
impl<S, Predicate> OrFilterDsl<Predicate> for Alias<S> where
Self: AsQuery,
<Self as AsQuery>::Query: OrFilterDsl<Predicate>,
sourceimpl<S, Expr> OrderDsl<Expr> for Alias<S> where
Expr: Expression,
Self: AsQuery,
<Self as AsQuery>::Query: OrderDsl<Expr>,
impl<S, Expr> OrderDsl<Expr> for Alias<S> where
Expr: Expression,
Self: AsQuery,
<Self as AsQuery>::Query: OrderDsl<Expr>,
sourceimpl<S: AliasSource> QueryDsl for Alias<S>
impl<S: AliasSource> QueryDsl for Alias<S>
sourcefn distinct(self) -> Distinct<Self> where
Self: DistinctDsl,
fn distinct(self) -> Distinct<Self> where
Self: DistinctDsl,
Adds the DISTINCT
keyword to a query. Read more
sourcefn distinct_on<Expr>(self, expr: Expr) -> DistinctOn<Self, Expr> where
Self: DistinctOnDsl<Expr>,
fn distinct_on<Expr>(self, expr: Expr) -> DistinctOn<Self, Expr> where
Self: DistinctOnDsl<Expr>,
postgres
only.Adds the DISTINCT ON
clause to a query. Read more
sourcefn select<Selection>(self, selection: Selection) -> Select<Self, Selection> where
Selection: Expression,
Self: SelectDsl<Selection>,
fn select<Selection>(self, selection: Selection) -> Select<Self, Selection> where
Selection: Expression,
Self: SelectDsl<Selection>,
Adds a SELECT
clause to the query. Read more
sourcefn count(self) -> Select<Self, CountStar> where
Self: SelectDsl<CountStar>,
fn count(self) -> Select<Self, CountStar> where
Self: SelectDsl<CountStar>,
Get the count of a query. This is equivalent to .select(count_star())
Read more
sourcefn inner_join<Rhs>(self, rhs: Rhs) -> InnerJoin<Self, Rhs> where
Self: JoinWithImplicitOnClause<Rhs, Inner>,
fn inner_join<Rhs>(self, rhs: Rhs) -> InnerJoin<Self, Rhs> where
Self: JoinWithImplicitOnClause<Rhs, Inner>,
Join two tables using a SQL INNER JOIN
. Read more
sourcefn left_outer_join<Rhs>(self, rhs: Rhs) -> LeftJoin<Self, Rhs> where
Self: JoinWithImplicitOnClause<Rhs, LeftOuter>,
fn left_outer_join<Rhs>(self, rhs: Rhs) -> LeftJoin<Self, Rhs> where
Self: JoinWithImplicitOnClause<Rhs, LeftOuter>,
Join two tables using a SQL LEFT OUTER JOIN
. Read more
sourcefn left_join<Rhs>(self, rhs: Rhs) -> LeftJoin<Self, Rhs> where
Self: JoinWithImplicitOnClause<Rhs, LeftOuter>,
fn left_join<Rhs>(self, rhs: Rhs) -> LeftJoin<Self, Rhs> where
Self: JoinWithImplicitOnClause<Rhs, LeftOuter>,
Alias for left_outer_join
. Read more
sourcefn filter<Predicate>(self, predicate: Predicate) -> Filter<Self, Predicate> where
Self: FilterDsl<Predicate>,
fn filter<Predicate>(self, predicate: Predicate) -> Filter<Self, Predicate> where
Self: FilterDsl<Predicate>,
Adds to the WHERE
clause of a query. Read more
sourcefn or_filter<Predicate>(self, predicate: Predicate) -> OrFilter<Self, Predicate> where
Self: OrFilterDsl<Predicate>,
fn or_filter<Predicate>(self, predicate: Predicate) -> OrFilter<Self, Predicate> where
Self: OrFilterDsl<Predicate>,
Adds to the WHERE
clause of a query using OR
Read more
sourcefn find<PK>(self, id: PK) -> Find<Self, PK> where
Self: FindDsl<PK>,
fn find<PK>(self, id: PK) -> Find<Self, PK> where
Self: FindDsl<PK>,
Attempts to find a single record from the given table by primary key. Read more
sourcefn order<Expr>(self, expr: Expr) -> Order<Self, Expr> where
Expr: Expression,
Self: OrderDsl<Expr>,
fn order<Expr>(self, expr: Expr) -> Order<Self, Expr> where
Expr: Expression,
Self: OrderDsl<Expr>,
Sets the order clause of a query. Read more
sourcefn order_by<Expr>(self, expr: Expr) -> Order<Self, Expr> where
Expr: Expression,
Self: OrderDsl<Expr>,
fn order_by<Expr>(self, expr: Expr) -> Order<Self, Expr> where
Expr: Expression,
Self: OrderDsl<Expr>,
Alias for order
sourcefn then_order_by<Order>(self, order: Order) -> ThenOrderBy<Self, Order> where
Self: ThenOrderDsl<Order>,
fn then_order_by<Order>(self, order: Order) -> ThenOrderBy<Self, Order> where
Self: ThenOrderDsl<Order>,
Appends to the ORDER BY
clause of this SQL query. Read more
sourcefn limit(self, limit: i64) -> Limit<Self> where
Self: LimitDsl,
fn limit(self, limit: i64) -> Limit<Self> where
Self: LimitDsl,
Sets the limit clause of the query. Read more
sourcefn offset(self, offset: i64) -> Offset<Self> where
Self: OffsetDsl,
fn offset(self, offset: i64) -> Offset<Self> where
Self: OffsetDsl,
Sets the offset clause of the query. Read more
sourcefn group_by<GB>(self, group_by: GB) -> GroupBy<Self, GB> where
GB: Expression,
Self: GroupByDsl<GB>,
fn group_by<GB>(self, group_by: GB) -> GroupBy<Self, GB> where
GB: Expression,
Self: GroupByDsl<GB>,
Sets the group by
clause of a query. Read more
sourcefn having<Predicate>(self, predicate: Predicate) -> Having<Self, Predicate> where
Self: HavingDsl<Predicate>,
fn having<Predicate>(self, predicate: Predicate) -> Having<Self, Predicate> where
Self: HavingDsl<Predicate>,
Adds to the HAVING
clause of a query. Read more
sourcefn for_update(self) -> ForUpdate<Self> where
Self: LockingDsl<ForUpdate>,
fn for_update(self) -> ForUpdate<Self> where
Self: LockingDsl<ForUpdate>,
Adds FOR UPDATE
to the end of the select statement. Read more
sourcefn for_no_key_update(self) -> ForNoKeyUpdate<Self> where
Self: LockingDsl<ForNoKeyUpdate>,
fn for_no_key_update(self) -> ForNoKeyUpdate<Self> where
Self: LockingDsl<ForNoKeyUpdate>,
Adds FOR NO KEY UPDATE
to the end of the select statement. Read more
Adds FOR SHARE
to the end of the select statement. Read more
Adds FOR KEY SHARE
to the end of the select statement. Read more
sourcefn skip_locked(self) -> SkipLocked<Self> where
Self: ModifyLockDsl<SkipLocked>,
fn skip_locked(self) -> SkipLocked<Self> where
Self: ModifyLockDsl<SkipLocked>,
Adds SKIP LOCKED
to the end of a FOR UPDATE
clause. Read more
sourcefn no_wait(self) -> NoWait<Self> where
Self: ModifyLockDsl<NoWait>,
fn no_wait(self) -> NoWait<Self> where
Self: ModifyLockDsl<NoWait>,
Adds NOWAIT
to the end of a FOR UPDATE
clause. Read more
sourcefn into_boxed<'a, DB>(self) -> IntoBoxed<'a, Self, DB> where
DB: Backend,
Self: BoxedDsl<'a, DB>,
fn into_boxed<'a, DB>(self) -> IntoBoxed<'a, Self, DB> where
DB: Backend,
Self: BoxedDsl<'a, DB>,
Boxes the pieces of a query into a single type. Read more
sourcefn single_value(self) -> SingleValue<Self> where
Self: SingleValueDsl,
fn single_value(self) -> SingleValue<Self> where
Self: SingleValueDsl,
Wraps this select statement in parenthesis, allowing it to be used as an expression. Read more
sourcefn nullable(self) -> NullableSelect<Self> where
Self: SelectNullableDsl,
fn nullable(self) -> NullableSelect<Self> where
Self: SelectNullableDsl,
Coerce the SQL type of the select clause to it’s nullable equivalent. Read more
sourceimpl<S> QueryId for Alias<S> where
Self: 'static,
S: AliasSource,
S::Target: QueryId,
impl<S> QueryId for Alias<S> where
Self: 'static,
S: AliasSource,
S::Target: QueryId,
sourceconst HAS_STATIC_QUERY_ID: bool = ::HAS_STATIC_QUERY_ID
const HAS_STATIC_QUERY_ID: bool = ::HAS_STATIC_QUERY_ID
Can the SQL generated by Self
be uniquely identified by its type? Read more
sourceimpl<S> QuerySource for Alias<S> where
Self: Clone,
S: AliasSource,
S::Target: QuerySource,
<S::Target as QuerySource>::DefaultSelection: FieldAliasMapper<S>,
<<S::Target as QuerySource>::DefaultSelection as FieldAliasMapper<S>>::Out: SelectableExpression<Self>,
impl<S> QuerySource for Alias<S> where
Self: Clone,
S: AliasSource,
S::Target: QuerySource,
<S::Target as QuerySource>::DefaultSelection: FieldAliasMapper<S>,
<<S::Target as QuerySource>::DefaultSelection as FieldAliasMapper<S>>::Out: SelectableExpression<Self>,
type FromClause = Alias<S>
type FromClause = Alias<S>
The type returned by from_clause
type DefaultSelection = <<<S as AliasSource>::Target as QuerySource>::DefaultSelection as FieldAliasMapper<S>>::Out
type DefaultSelection = <<<S as AliasSource>::Target as QuerySource>::DefaultSelection as FieldAliasMapper<S>>::Out
The type returned by default_selection
sourcefn from_clause(&self) -> Self::FromClause
fn from_clause(&self) -> Self::FromClause
The actual FROM
clause of this type. This is typically only called in
QueryFragment
implementations. Read more
sourcefn default_selection(&self) -> Self::DefaultSelection
fn default_selection(&self) -> Self::DefaultSelection
The default select clause of this type, which should be used if no
select clause was explicitly specified. This should always be a tuple of
all the desired columns, not star
Read more
sourceimpl<S: AliasSource, Conn> RunQueryDsl<Conn> for Alias<S>
impl<S: AliasSource, Conn> RunQueryDsl<Conn> for Alias<S>
sourcefn execute(self, conn: &mut Conn) -> QueryResult<usize> where
Conn: Connection,
Self: ExecuteDsl<Conn>,
fn execute(self, conn: &mut Conn) -> QueryResult<usize> where
Conn: Connection,
Self: ExecuteDsl<Conn>,
Executes the given command, returning the number of rows affected. Read more
sourcefn load<'query, U>(self, conn: &mut Conn) -> QueryResult<Vec<U>> where
Self: LoadQuery<'query, Conn, U>,
fn load<'query, U>(self, conn: &mut Conn) -> QueryResult<Vec<U>> where
Self: LoadQuery<'query, Conn, U>,
sourcefn load_iter<'conn, 'query: 'conn, U>(
self,
conn: &'conn mut Conn
) -> QueryResult<LoadIter<'conn, 'query, Self, Conn, U>> where
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'conn,
fn load_iter<'conn, 'query: 'conn, U>(
self,
conn: &'conn mut Conn
) -> QueryResult<LoadIter<'conn, 'query, Self, Conn, U>> where
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'conn,
sourcefn get_result<'query, U>(self, conn: &mut Conn) -> QueryResult<U> where
Self: LoadQuery<'query, Conn, U>,
fn get_result<'query, U>(self, conn: &mut Conn) -> QueryResult<U> where
Self: LoadQuery<'query, Conn, U>,
Runs the command, and returns the affected row. Read more
sourcefn get_results<'query, U>(self, conn: &mut Conn) -> QueryResult<Vec<U>> where
Self: LoadQuery<'query, Conn, U>,
fn get_results<'query, U>(self, conn: &mut Conn) -> QueryResult<Vec<U>> where
Self: LoadQuery<'query, Conn, U>,
Runs the command, returning an Vec
with the affected rows. Read more
sourceimpl<S, Selection> SelectDsl<Selection> for Alias<S> where
Selection: Expression,
Self: AsQuery,
<Self as AsQuery>::Query: SelectDsl<Selection>,
impl<S, Selection> SelectDsl<Selection> for Alias<S> where
Selection: Expression,
Self: AsQuery,
<Self as AsQuery>::Query: SelectDsl<Selection>,
sourceimpl<S, Expr> ThenOrderDsl<Expr> for Alias<S> where
Expr: Expression,
Self: AsQuery,
<Self as AsQuery>::Query: ThenOrderDsl<Expr>,
impl<S, Expr> ThenOrderDsl<Expr> for Alias<S> where
Expr: Expression,
Self: AsQuery,
<Self as AsQuery>::Query: ThenOrderDsl<Expr>,
type Output = <<Alias<S> as AsQuery>::Query as ThenOrderDsl<Expr>>::Output
type Output = <<Alias<S> as AsQuery>::Query as ThenOrderDsl<Expr>>::Output
The type returned by .then_order_by
.
sourcefn then_order_by(self, expr: Expr) -> Self::Output
fn then_order_by(self, expr: Expr) -> Self::Output
See the trait documentation.
impl<S: Copy> Copy for Alias<S>
impl<S2, S> JoinTo<Alias<S2>> for Alias<S> where
S2: AliasSource,
S: AliasSource + Default,
S::Target: JoinTo<Alias<S2>>,
<S::Target as JoinTo<Alias<S2>>>::OnClause: FieldAliasMapper<S>,
impl<T, S> JoinTo<T> for Alias<S> where
T: Table,
S: AliasSource + Default,
S::Target: JoinTo<T>,
<S::Target as JoinTo<T>>::OnClause: FieldAliasMapper<S>,
impl<S, C> SelectableExpression<Alias<S>> for AliasedField<S, C> where
S: AliasSource,
C: Column<Table = S::Target>,
Self: AppearsOnTable<Alias<S>>,
Auto Trait Implementations
impl<S> RefUnwindSafe for Alias<S> where
S: RefUnwindSafe,
impl<S> Send for Alias<S> where
S: Send,
impl<S> Sync for Alias<S> where
S: Sync,
impl<S> Unpin for Alias<S> where
S: Unpin,
impl<S> UnwindSafe for Alias<S> where
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Conn, DB, T> ExecuteDsl<Conn, DB> for T where
Conn: Connection<Backend = DB>,
DB: Backend,
T: QueryFragment<DB, NotSpecialized> + QueryId,
impl<Conn, DB, T> ExecuteDsl<Conn, DB> for T where
Conn: Connection<Backend = DB>,
DB: Backend,
T: QueryFragment<DB, NotSpecialized> + QueryId,
sourceimpl<T> IntoSql for T
impl<T> IntoSql for T
sourcefn into_sql<T>(self) -> AsExprOf<Self, T> where
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
fn into_sql<T>(self) -> AsExprOf<Self, T> where
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
Convert self
to an expression for Diesel’s query builder. Read more
sourcefn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T> where
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
fn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T> where
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
Convert &self
to an expression for Diesel’s query builder. Read more