Skip to main content

Join

Struct Join 

Source
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: bool

True 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.

Trait Implementations§

Source§

impl Clone for Join

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Join

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Join

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Join

Auto Trait Implementations§

§

impl Freeze for Join

§

impl RefUnwindSafe for Join

§

impl Send for Join

§

impl Sync for Join

§

impl Unpin for Join

§

impl UnsafeUnpin for Join

§

impl UnwindSafe for Join

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.