proof_of_sql_parser

Module utility

Source
Expand description

Shortcuts to construct intermediate AST nodes.

Functions§

  • Construct a new boxed Expression A + B
  • An expression with an alias i.e. EXPR AS ALIAS
  • Construct a new boxed Expression P 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 boxed Expression A / B
  • Construct a new boxed Expression A == B
  • Construct a new boxed Expression A >= B
  • Group by clause with multiple columns i.e. GROUP BY ID0, ID1, …
  • Panics
  • Construct a new boxed Expression A <= 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 boxed Expression A * B
  • Construct a new boxed Expression NOT P
  • Construct a new boxed Expression P 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 a SetExpression of the kind SELECT COL1, COL2, … FROM TAB WHERE EXPR GROUP BY …
  • Generate a SetExpression of the kind SELECT COL1, COL2, … FROM TAB GROUP BY …
  • Generate a query of the kind SELECT … ORDER BY … [LIMIT … OFFSET …]
  • Slice a query result using LIMIT and OFFSET clauses i.e. LIMIT N OFFSET M
  • Construct a new boxed Expression A - 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.