Expand description
Shortcuts to construct intermediate AST nodes.
Functions§
- add
- Construct a new boxed
Expression
A + B - aliased_
expr - An expression with an alias i.e. EXPR AS ALIAS
- and
- Construct a new boxed
Expression
P AND Q - col
- Get column from name
- col_res
- Select one column from a table and give it an alias i.e. SELECT COL AS ALIAS
- col_
res_ all - Select all columns from a table i.e. SELECT *
- cols_
res - Select multiple columns from a table i.e. SELECT COL1, COL2, …
- count
- Count the amount of non-null entries of expression
- count_
all - Count the rows
- count_
all_ res - Count rows and give the result an alias i.e. SELECT COUNT(*) AS ALIAS
- count_
res - Count the amount of non-null entries of expression and give it an alias i.e. SELECT COUNT(EXPR) AS ALIAS
- div
- Construct a new boxed
Expression
A / B - equal
- Construct a new boxed
Expression
A == B - ge
- Construct a new boxed
Expression
A >= B - group_
by - Group by clause with multiple columns i.e. GROUP BY ID0, ID1, …
- gt
- Construct a new boxed
Expression
A > B - ident
- Panics
- le
- Construct a new boxed
Expression
A <= B - lit
- Get literal from value
- lt
- Construct a new boxed
Expression
A < B - max
- Compute the maximum of an expression
- max_res
- Compute the maximum of an expression and give it an alias i.e. SELECT MAX(EXPR) AS ALIAS
- min
- Compute the minimum of an expression
- min_res
- Compute the minimum of an expression and give it an alias i.e. SELECT MIN(EXPR) AS ALIAS
- mul
- Construct a new boxed
Expression
A * B - not
- Construct a new boxed
Expression
NOT P - or
- Construct a new boxed
Expression
P OR Q - order
- Order by one column i.e. ORDER BY ID [ASC|DESC]
- orders
- Order by multiple columns i.e. ORDER BY ID0 [ASC|DESC], ID1 [ASC|DESC], …
- query
- Generate a
SetExpression
of the kind SELECT COL1, COL2, … FROM TAB WHERE EXPR GROUP BY … - query_
all - Generate a
SetExpression
of the kind SELECT COL1, COL2, … FROM TAB GROUP BY … - select
- Generate a query of the kind SELECT … ORDER BY … [LIMIT … OFFSET …]
- slice
- Slice a query result using
LIMIT
andOFFSET
clauses i.e. LIMIT N OFFSET M - sub
- Construct a new boxed
Expression
A - B - sum
- Compute the sum of an expression
- sum_res
- Compute the sum of an expression and give it an alias i.e. SELECT SUM(EXPR) AS ALIAS
- tab
- Get table from schema and name.