pub enum FromClause {
Table {
name: String,
qualifier: String,
alias: Option<String>,
},
Join {
left: Box<FromClause>,
right: Box<FromClause>,
kind: JoinKind,
on: Option<Expr>,
using: Option<JoinUsing>,
natural: bool,
lateral: bool,
},
Values {
rows: Vec<Vec<Expr>>,
alias: Option<String>,
column_aliases: Vec<String>,
},
Function {
name: String,
output_name: String,
relation: Option<String>,
args: Vec<Expr>,
alias: Option<String>,
column_aliases: Vec<String>,
column_types: Vec<String>,
},
Subquery {
body: Box<SelectStmt>,
alias: Option<String>,
column_aliases: Vec<String>,
},
}Variants§
Table
FROM <table> [AS <alias>].
Fields
Join
FROM left <kind> right ON predicate. lateral is true when
the right side is a LATERAL subquery / function – the engine
re-evaluates it for every left row.
Fields
left: Box<FromClause>right: Box<FromClause>on: Option<Expr>Boolean qualification supplied by ON. This is mutually
exclusive with using and natural in parser-produced trees.
using: Option<JoinUsing>PostgreSQL USING (column, ...) [AS alias] metadata. The column
list must remain explicit until both input row types are known so
binding can validate each side and construct the merged output.
Values
FROM (VALUES (...)...) [AS <alias>(<col_aliases>)].
Function
FROM <fn>(<args>) [AS <alias>(<col_aliases>)] – e.g.
generate_series(1, 5), unnest(arr), regexp_split_to_table,
json_each(...), cypher(...) AS (col agtype, ...). The engine
dispatches by name.
Fields
output_name: StringLocal function identifier used as PostgreSQL’s default output column label. Kept separate from the catalog-qualified lookup name so quoted identifiers containing . remain indivisible.
Subquery
FROM (SELECT ...) AS <alias> – subquery as a relation.
The body re-runs as if a CTE; the alias renames the result
columns when supplied.
Implementations§
Source§impl FromClause
impl FromClause
Trait Implementations§
Source§impl Clone for FromClause
impl Clone for FromClause
Source§fn clone(&self) -> FromClause
fn clone(&self) -> FromClause
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FromClause
impl Debug for FromClause
Source§impl<'de> Deserialize<'de> for FromClause
impl<'de> Deserialize<'de> for FromClause
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for FromClause
impl RefUnwindSafe for FromClause
impl Send for FromClause
impl Sync for FromClause
impl Unpin for FromClause
impl UnsafeUnpin for FromClause
impl UnwindSafe for FromClause
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more