[][src]Struct postgres_parser::sys::JoinExpr

#[repr(C)]pub struct JoinExpr {
    pub type_: NodeTag,
    pub jointype: JoinType,
    pub isNatural: bool,
    pub larg: *mut Node,
    pub rarg: *mut Node,
    pub usingClause: *mut List,
    pub quals: *mut Node,
    pub alias: *mut Alias,
    pub rtindex: c_int,
}

JoinExpr for SQL JOIN expressions

isNatural, usingClause, and quals are interdependent. The user can write only one of NATURAL, USING(), or ON() (this is enforced by the grammar). If he writes NATURAL then parse analysis generates the equivalent USING() list, and from that fills in "quals" with the right equality comparisons. If he writes USING() then "quals" is filled with equality comparisons. If he writes ON() then only "quals" is set. Note that NATURAL/USING are not equivalent to ON() since they also affect the output column list.

alias is an Alias node representing the AS aliasclause attached to the join expression, or NULL if no clause. NB: presence or absence of the alias has a critical impact on semantics, because a join with an alias restricts visibility of the tables/columns inside it.

During parse analysis, an RTE is created for the Join, and its index is filled into rtindex. This RTE is present mainly so that Vars can be created that refer to the outputs of the join. The planner sometimes generates JoinExprs internally; these can have rtindex = 0 if there are no join alias variables referencing such joins.

Fields

type_: NodeTagjointype: JoinTypeisNatural: bool

type of join

larg: *mut Node

Natural join? Will need to shape table

rarg: *mut Node

left subtree

usingClause: *mut List

right subtree

quals: *mut Node

USING clause, if any (list of String)

alias: *mut Alias

qualifiers on join, if any

rtindex: c_int

userwritten alias clause, if any

Trait Implementations

impl Debug for JoinExpr[src]

impl Default for JoinExpr[src]

impl Eq for JoinExpr[src]

impl Hash for JoinExpr[src]

impl PartialEq<JoinExpr> for JoinExpr[src]

impl StructuralEq for JoinExpr[src]

impl StructuralPartialEq for JoinExpr[src]

Auto Trait Implementations

impl RefUnwindSafe for JoinExpr

impl !Send for JoinExpr

impl !Sync for JoinExpr

impl Unpin for JoinExpr

impl UnwindSafe for JoinExpr

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.