Expand description
Shortcuts to construct intermediate AST nodes.
Functions§
- add
- Construct a new boxed
ExpressionA + B - aliased_
expr - An expression with an alias i.e. EXPR AS ALIAS
- and
- Construct a new boxed
ExpressionP 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
ExpressionA / B - equal
- Construct a new boxed
ExpressionA == B - ge
- Construct a new boxed
ExpressionA >= B - group_
by - Group by clause with multiple columns i.e. GROUP BY ID0, ID1, …
- gt
- Construct a new boxed
ExpressionA > B - ident
- Panics
- le
- Construct a new boxed
ExpressionA <= B - lit
- Get literal from value
- lt
- Construct a new boxed
ExpressionA < 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
ExpressionA * B - not
- Construct a new boxed
ExpressionNOT P - or
- Construct a new boxed
ExpressionP 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
SetExpressionof the kind SELECT COL1, COL2, … FROM TAB WHERE EXPR GROUP BY … - query_
all - Generate a
SetExpressionof 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
LIMITandOFFSETclauses i.e. LIMIT N OFFSET M - sub
- Construct a new boxed
ExpressionA - 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.