Skip to main content

Crate lutra_sql

Crate lutra_sql 

Source
Expand description

SQL Abstract Syntax Tree (AST) types

Structs§

Assignment
SQL assignment foo = expr as used in Update
CaseWhen
A WHEN clause in a CASE expression containing both the condition and its corresponding result
Copy
Cte
A single CTE (used after WITH): <alias> [(col1, col2, ...)] AS <materialized> ( <query> ) The names in the column list before AS, when specified, replace the names of the columns returned by the query. The parser does not validate that the number of columns in the query matches the number of columns in the query.
Delete
DELETE statement.
DisplayCommaSeparated
A value that displays a comma-separated list of values. When pretty-printed (using {:#}), it displays each value on a new line.
DisplaySeparated
ExprWithAlias
An expression optionally followed by an alias.
Ident
An identifier, decomposed into its value or character data and the quote style.
Indent
A wrapper around a value that adds an indent to the value when displayed with {:#}.
Insert
INSERT statement.
Join
LateralView
A hive LATERAL VIEW with potential column aliases
ObjectName
A name of a table, view, custom type, etc., possibly multi-part, i.e. db.schema.obj
OrderBy
OrderByExpr
An ORDER BY expression
OrderByOptions
Query
The most complete variant of a SELECT query expression, optionally including WITH, UNION / other set operations, and ORDER BY.
RelNamed
A table name or a parenthesized subquery with an optional alias
Select
A restricted variant of SELECT (without CTEs/ORDER BY), which may appear either as the only body item of a Query, or as an operand to a set operation like UNION.
SelectInto
SelectItem
One item of the comma-separated list following SELECT
TableAlias
Update
Values
With

Enums§

AssignmentTarget
Left-hand side of an assignment in an UPDATE statement, e.g. foo in foo = 5 (ColumnName assignment) or (a, b) in (a, b) = (1, 2) (Tuple assignment).
CteAsMaterialized
Distinct
Expr
An SQL expression of any type.
JoinConstraint
JoinOperator
OrderByKind
RelExpr
SetExpr
A node in a tree, representing a “query body” expression, roughly: SELECT ... [ {UNION|EXCEPT|INTERSECT} SELECT ...]
SetOperator
SetQuantifier
A quantifier for SetOperator.
TableVersion

Functions§

display_comma_separated
display_separated
escape_string