diesel::query_source

Trait AppearsInFromClause

Source
pub trait AppearsInFromClause<QS> {
    type Count;
}
Expand description

Determines how many times Self appears in QS

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§

Source

type Count

How many times does Self appear in QS?

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

Source§

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>,

Source§

type Count = <<S as AliasSource>::Target as AliasAppearsInFromClause<S, QS>>::Count

Source§

impl<T1, T2> AppearsInFromClause<T2> for T1
where T1: TableNotEqual<T2> + Table, T2: Table,