Module partiql_ast::ast
source · Expand description
A PartiQL abstract syntax tree (AST).
This module contains the structures for the language AST.
Two main entities in the module are Item and AstNode. AstNode represents an AST node
and Item represents a PartiQL statement type, e.g. query, data definition language (DDL)
data manipulation language (DML).
Structs
- Represents
<expr> = <expr>in a DML SET operation. Note that in this case,=is representing an assignment operation and not the equality operator. - Represents an AST node.
- A generic pair of expressions. Used in the
pub struct,searched_caseandsimple_caseexpr variants above. - FROM clause of an SFW query
- GROUP BY <grouping_strategy> <group_key>[, <group_key>]… [AS
] [AS ] ON CONFLICT <expr> <conflict_action>- ORDER BY <sort_spec>…
<returning mapping> (<expr> [, <expr>]...)RETURNING (<returning_elem> [, <returning_elem>]...)[ASC | DESC] ?
Enums
- Is used to determine if variable lookup should be case-sensitive or not.
CONFLICT_ACTION <action>- The expressions that can result in values.
- Indicates the type of FromLet, see the following for more details: https:///github.com/partiql/partiql-lang-kotlin/issues/242
- Desired grouping qualifier: ALL or PARTIAL. Note: the
group_prefix is needed to avoid naming clashes. - Indicates the logical type of join.
Litis mostly inspired by SQL-92 Literals standard and PartiQL specification. See section 5.3 in the following: https://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt and Section 2 of the following (Figure 1: BNF Grammar for PartiQL Values): https://partiql.org/assets/PartiQL-Specification.pdf- A “step” within a path expression; that is the components of the expression following the root.
- An item to be projected in a
SELECT-list. - Indicates the type of projection in a SFW query.
- ( MODIFIED | ALL ) ( NEW | OLD )
- Indicates scope search order when resolving variables. Has no effect except within
FROMsources. - Indicates if a set should be reduced to its distinct elements or not.
- Represents all possible PartiQL data types.