Skip to main content

Module ast

Module ast 

Source
Expand description

Abstract syntax tree of the supported SQL dialect.

parse produces these types. They describe the statement exactly as written: names are not checked against a schema and literals are not converted to column types yet. The grammar they model is documented in the SQL reference of the wasm-dbms book.

Structs§

Aggregate
An aggregate function call such as COUNT(*) or SUM(price).
Assignment
One column = value entry of an UPDATE ... SET list.
ColumnRef
A column name, optionally qualified: column or table.column.
Delete
A DELETE FROM table WHERE condition [CASCADE | RESTRICT] statement.
Insert
An INSERT INTO table (columns) VALUES (values) statement.
JoinClause
A JOIN table ON left = right clause.
OrderItem
One ORDER BY entry: operand [ASC | DESC].
Select
A SELECT statement.
SelectItem
One entry of an explicit select list: operand [AS alias].
TableRef
A table in FROM or JOIN: name [[AS] alias].
Update
An UPDATE table SET assignments WHERE condition statement.

Enums§

AggregateKind
The supported aggregate functions.
CompareOp
A comparison operator.
Condition
A boolean condition of a WHERE or HAVING clause.
JoinKind
The supported join types.
Literal
A literal value, before conversion to a column type.
Operand
Something that yields a value per row or per group.
Projection
The select list of a Select.
RowCount
The argument of LIMIT or OFFSET.
Statement
A parsed SQL statement.
ValueExpr
A value written in the statement: a literal or a ? placeholder.