Skip to main content

ScopeContains

Trait ScopeContains 

Source
pub trait ScopeContains<Key, Witness> {
    type Nullable: Nullability;
}
Expand description

The scope Self contains a source whose key is Key.

Tables and views are looked up by SQL name, so the first (innermost) matching source wins: a correlated subquery that reads the same table as its outer query resolves to its own copy, as in SQL. Aliased sources are looked up by alias type.

When this fails, the compiler reports “X is not in this query’s FROM/JOIN scope”. Witness is a proof type the compiler infers.

Required Associated Types§

Source

type Nullable: Nullability

Null when the found source is on the nullable side of an outer join.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Name, Table, Scope> ScopeContains<TableKey<Name, Table>, ScopeFound> for Scope
where Scope: FindTable<Table>,

Source§

type Nullable = <Scope as FindTable<Table>>::Nullable

Source§

impl<Tag, Head, Tail, Witness> ScopeContains<AliasKey<Tag>, ScopeThere<Witness>> for Cons<Head, Tail>
where Tail: ScopeContains<AliasKey<Tag>, Witness>,

Source§

type Nullable = <Tail as ScopeContains<AliasKey<Tag>, Witness>>::Nullable

Source§

impl<Tag, Head, Tail> ScopeContains<AliasKey<Tag>, ScopeHere> for Cons<Head, Tail>
where Head: ScopeEntry<Key = AliasKey<Tag>>,