Enum sqlparser::ast::TableFactor
source · [−]pub enum TableFactor {
Table {
name: ObjectName,
alias: Option<TableAlias>,
args: Vec<FunctionArg>,
with_hints: Vec<Expr>,
},
Derived {
lateral: bool,
subquery: Box<Query>,
alias: Option<TableAlias>,
},
TableFunction {
expr: Expr,
alias: Option<TableAlias>,
},
NestedJoin(Box<TableWithJoins>),
}
Expand description
A table name or a parenthesized subquery with an optional alias
Variants
Table
Fields
name: ObjectName
alias: Option<TableAlias>
args: Vec<FunctionArg>
Arguments of a table-valued function, as supported by Postgres
and MSSQL. Note that deprecated MSSQL FROM foo (NOLOCK)
syntax
will also be parsed as args
.
Derived
TableFunction
TABLE(<expr>)[ AS <alias> ]
NestedJoin(Box<TableWithJoins>)
Represents a parenthesized table factor. The SQL spec only allows a
join expression ((foo <JOIN> bar [ <JOIN> baz ... ])
) to be nested,
possibly several times.
The parser may also accept non-standard nesting of bare tables for some dialects, but the information about such nesting is stripped from AST.
Trait Implementations
sourceimpl Clone for TableFactor
impl Clone for TableFactor
sourcefn clone(&self) -> TableFactor
fn clone(&self) -> TableFactor
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TableFactor
impl Debug for TableFactor
sourceimpl Display for TableFactor
impl Display for TableFactor
sourceimpl Hash for TableFactor
impl Hash for TableFactor
sourceimpl PartialEq<TableFactor> for TableFactor
impl PartialEq<TableFactor> for TableFactor
sourcefn eq(&self, other: &TableFactor) -> bool
fn eq(&self, other: &TableFactor) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TableFactor) -> bool
fn ne(&self, other: &TableFactor) -> bool
This method tests for !=
.
impl Eq for TableFactor
impl StructuralEq for TableFactor
impl StructuralPartialEq for TableFactor
Auto Trait Implementations
impl RefUnwindSafe for TableFactor
impl Send for TableFactor
impl Sync for TableFactor
impl Unpin for TableFactor
impl UnwindSafe for TableFactor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more