pub struct Join {
pub kind: JoinKind,
pub left: FromItem,
pub right: FromItem,
pub on: Option<Expr>,
pub using: Vec<String>,
pub plain_using: bool,
pub alias: Option<String>,
pub using_alias: Option<String>,
pub merged: Vec<Expr>,
pub columns: Vec<(String, Expr)>,
pub aliases: Vec<String>,
pub sources: Vec<(usize, usize)>,
}Expand description
A join of two parts of FROM.
Fields§
§kind: JoinKind§left: FromItem§right: FromItem§on: Option<Expr>The condition of ON or of USING, of type boolean, or None for a cross join.
using: Vec<String>The names of the columns of USING, or the common columns of a natural join.
plain_using: boolTrue when each merged column of USING is a column of one side with no cast. A merged column of a full join, or with a cast, is not a column of one side, as has_dangerous_join_using finds.
alias: Option<String>The alias of the join.
using_alias: Option<String>The alias of USING (...) AS name.
merged: Vec<Expr>The value of each column of USING, as joinaliasvars has it: a column of one side, a cast of it, or COALESCE of the two sides for a full join.
columns: Vec<(String, Expr)>The name and the value of each column of the join, as eref->colnames and joinaliasvars: the columns of USING first, then the other columns of the left side, then the other columns of the right side.
aliases: Vec<String>The names of the columns that the alias of the join gives, as alias->colnames.
sources: Vec<(usize, usize)>For each column of the join, the number from 1 of the column of the left side and of the right side that it reads, or 0, as joinleftcols and joinrightcols.