pub enum TableReference<'a> {
Table {
identifier: QualifiedName<'a>,
as_span: Option<Span>,
as_: Option<Identifier<'a>>,
index_hints: Vec<IndexHint<'a>>,
},
Query {
query: Box<Statement<'a>>,
as_span: Option<Span>,
as_: Option<Identifier<'a>>,
col_list: Vec<Identifier<'a>>,
},
JsonTable {
json_table_span: Span,
json_expr: Expression<'a>,
path: Expression<'a>,
columns_keyword_span: Span,
columns: Vec<JsonTableColumn<'a>>,
as_span: Option<Span>,
as_: Option<Identifier<'a>>,
},
Function {
name: TableFunctionName<'a>,
args: Vec<Expression<'a>>,
with_ordinality: Option<Span>,
as_span: Option<Span>,
as_: Option<Identifier<'a>>,
},
Join {
join: JoinType,
left: Box<TableReference<'a>>,
right: Box<TableReference<'a>>,
specification: Option<JoinSpecification<'a>>,
},
}Expand description
Reference to table in select
Variants§
Table
Reference to a table or view
Fields
§
identifier: QualifiedName<'a>Name of table to to select from
§
as_: Option<Identifier<'a>>Alias for table if specified
Query
Subquery
Fields
§
as_: Option<Identifier<'a>>Alias for table if specified
§
col_list: Vec<Identifier<'a>>Optional column list (col1, col2, ...) after the alias
JsonTable
JSON_TABLE function
Fields
§
json_expr: Expression<'a>JSON data expression
§
path: Expression<'a>JSON path expression
§
columns: Vec<JsonTableColumn<'a>>Column definitions
§
as_: Option<Identifier<'a>>Alias for table if specified
Function
Table-valued function call, e.g. generate_series(1, 10) or unnest(arr) WITH ORDINALITY
Fields
§
name: TableFunctionName<'a>The function name
§
args: Vec<Expression<'a>>Arguments passed to the function
§
as_: Option<Identifier<'a>>Alias for the result set if specified
Join
Join
Fields
§
left: Box<TableReference<'a>>Left hand side of join
§
right: Box<TableReference<'a>>Right hand side of join
§
specification: Option<JoinSpecification<'a>>How to do the join if specified
Trait Implementations§
Source§impl<'a> Clone for TableReference<'a>
impl<'a> Clone for TableReference<'a>
Source§fn clone(&self) -> TableReference<'a>
fn clone(&self) -> TableReference<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for TableReference<'a>
impl<'a> Debug for TableReference<'a>
Auto Trait Implementations§
impl<'a> Freeze for TableReference<'a>
impl<'a> RefUnwindSafe for TableReference<'a>
impl<'a> Send for TableReference<'a>
impl<'a> Sync for TableReference<'a>
impl<'a> Unpin for TableReference<'a>
impl<'a> UnsafeUnpin for TableReference<'a>
impl<'a> UnwindSafe for TableReference<'a>
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
Mutably borrows from an owned value. Read more