Module proof_of_sql_parser::utility 
source · Expand description
Shortcuts to construct intermediate AST nodes.
Functions§
- Construct a new boxedExpressionA + B
- An expression with an alias i.e. EXPR AS ALIAS
- Construct a new boxedExpressionP AND Q
- Get column from name
- Select one column from a table and give it an alias i.e. SELECT COL AS ALIAS
- Select all columns from a table i.e. SELECT *
- Select multiple columns from a table i.e. SELECT COL1, COL2, …
- Count the amount of non-null entries of expression
- Count the rows
- Count rows and give the result an alias i.e. SELECT COUNT(*) AS ALIAS
- Count the amount of non-null entries of expression and give it an alias i.e. SELECT COUNT(EXPR) AS ALIAS
- Construct a new boxedExpressionA / B
- Construct a new boxedExpressionA == B
- Construct a new boxedExpressionA >= B
- Group by clause with multiple columns i.e. GROUP BY ID0, ID1, …
- Construct an identifier from a str
- Construct a new boxedExpressionA <= B
- Get literal from value
- Compute the maximum of an expression
- Compute the maximum of an expression and give it an alias i.e. SELECT MAX(EXPR) AS ALIAS
- Compute the minimum of an expression
- Compute the minimum of an expression and give it an alias i.e. SELECT MIN(EXPR) AS ALIAS
- Construct a new boxedExpressionA * B
- Construct a new boxedExpressionNOT P
- Construct a new boxedExpressionP OR Q
- Order by one column i.e. ORDER BY ID [ASC|DESC]
- Order by multiple columns i.e. ORDER BY ID0 [ASC|DESC], ID1 [ASC|DESC], …
- Generate aSetExpressionof the kind SELECT COL1, COL2, … FROM TAB WHERE EXPR GROUP BY …
- Generate aSetExpressionof the kind SELECT COL1, COL2, … FROM TAB GROUP BY …
- Generate a query of the kind SELECT … ORDER BY … [LIMIT … OFFSET …]
- Slice a query result usingLIMITandOFFSETclauses i.e. LIMIT N OFFSET M
- Construct a new boxedExpressionA - B
- Compute the sum of an expression
- Compute the sum of an expression and give it an alias i.e. SELECT SUM(EXPR) AS ALIAS
- Get table from schema and name.