Enum sqlx_models_parser::ast::TableFactor [−][src]
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
Fields of Table
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
.
with_hints: Vec<Expr>
MSSQL-specific WITH (...)
hints such as NOLOCK.
Fields of Derived
TABLE(<expr>)[ AS <alias> ]
Fields of TableFunction
expr: Expr
alias: Option<TableAlias>
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.
Tuple Fields of NestedJoin
0: Box<TableWithJoins>
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
Mutably borrows from an owned value. Read more