[][src]Struct postgres_parser::nodes::JoinExpr

pub struct JoinExpr {
    pub jointype: JoinType,
    pub isNatural: bool,
    pub larg: Option<Box<Node>>,
    pub rarg: Option<Box<Node>>,
    pub usingClause: Option<Vec<Node>>,
    pub quals: Option<Box<Node>>,
    pub alias: Option<Box<Alias>>,
    pub rtindex: i32,
}

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

jointype: JoinTypeisNatural: boollarg: Option<Box<Node>>rarg: Option<Box<Node>>usingClause: Option<Vec<Node>>quals: Option<Box<Node>>alias: Option<Box<Alias>>rtindex: i32

Trait Implementations

impl Debug for JoinExpr[src]

impl<'de> Deserialize<'de> for JoinExpr[src]

impl Eq for JoinExpr[src]

impl PartialEq<JoinExpr> for JoinExpr[src]

impl Serialize for JoinExpr[src]

impl StructuralEq for JoinExpr[src]

impl StructuralPartialEq for JoinExpr[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.