pub trait AppearsInFromClause<QS> {
type Count;
}Expand description
Determines how many times QS appears in Self
This trait is primarily used to determine whether or not a column is selectable from a given from clause. A column can be selected if its table appears in the from clause exactly once.
We do not allow the same table to appear in a query multiple times in any context where referencing that table would be ambiguous (depending on the context and backend being used, this may or may not be something that would otherwise result in a runtime error).
Required Associated Types§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl<From, T> AppearsInFromClause<T> for SelectStatement<From>where
From: AsQuerySource,
From::QuerySource: AppearsInFromClause<T> + QuerySource,
Allow SelectStatement<From> to act as if it were From as long as
no other query methods have been called on it
impl<From, T> AppearsInFromClause<T> for SelectStatement<From>where
From: AsQuerySource,
From::QuerySource: AppearsInFromClause<T> + QuerySource,
Allow SelectStatement<From> to act as if it were From as long as
no other query methods have been called on it
type Count = <<From as AsQuerySource>::QuerySource as AppearsInFromClause<T>>::Count
Source§impl<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
Source§impl<StmtKind, T1, T2> AppearsInFromClause<T1> for ReturningQuerySource<StmtKind, T2>
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
impl<StmtKind, T1, T2> AppearsInFromClause<T1> for ReturningQuerySource<StmtKind, T2>
i-implement-a-third-party-backend-and-opt-into-breaking-changes only.Source§impl<StmtKind, T> AppearsInFromClause<OldIdent> for ReturningQuerySource<StmtKind, T>
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.There is an old. or old_value() in ReturningQuerySource<UpdateStmt, T>
impl<StmtKind, T> AppearsInFromClause<OldIdent> for ReturningQuerySource<StmtKind, T>
i-implement-a-third-party-backend-and-opt-into-breaking-changes only.There is an old. or old_value() in ReturningQuerySource<UpdateStmt, T>
Useful to check non-ambiguity of old or old_value
Source§impl<T1, T2> AppearsInFromClause<T2> for T1
impl<T1, T2> AppearsInFromClause<T2> for T1
Source§impl<T> AppearsInFromClause<OldIdent> for Twhere
T: QueryRelation,
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.There isn’t one directly on tables
(this is useful for typechecking old or old_value in subqueries in returning)
impl<T> AppearsInFromClause<OldIdent> for Twhere
T: QueryRelation,
i-implement-a-third-party-backend-and-opt-into-breaking-changes only.There isn’t one directly on tables
(this is useful for typechecking old or old_value in subqueries in returning)
Source§impl<T> AppearsInFromClause<ReturningQuerySource<OldIdent, T>> for ReturningQuerySource<InsertStmtWithOnConflictDoUpdate, T>
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.There is an old. or old_value for T in ReturningQuerySource<InsertStmtWithOnConflictDoUpdate, T>
impl<T> AppearsInFromClause<ReturningQuerySource<OldIdent, T>> for ReturningQuerySource<InsertStmtWithOnConflictDoUpdate, T>
i-implement-a-third-party-backend-and-opt-into-breaking-changes only.There is an old. or old_value for T in ReturningQuerySource<InsertStmtWithOnConflictDoUpdate, T>
Source§impl<T> AppearsInFromClause<ReturningQuerySource<OldIdent, T>> for ReturningQuerySource<UpdateStmt, T>
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.There is an old. or old_value for T in ReturningQuerySource<UpdateStmt, T>
impl<T> AppearsInFromClause<ReturningQuerySource<OldIdent, T>> for ReturningQuerySource<UpdateStmt, T>
i-implement-a-third-party-backend-and-opt-into-breaking-changes only.There is an old. or old_value for T in ReturningQuerySource<UpdateStmt, T>