This module contains an AST representation of a database query. The intention
is to encode the structure in the types so errors in the SQL statement are
detected at compile time.
Grammar
The grammar is expressed in PEG form using the same terminology as the dub
package Pegged. It has not been verified to be correct so may contain errors.
This is simplified to only contain those parts of the grammar that is needed to
pretty print constructed SQL queries. It is not intended to be a grammar that
can correctly parse SQL. Thus it contains "blobs of data" that the grammar do
not care about. The important part is to keep the structure. Where to insert
"blobs".
A secondary purpose is to give some compile time guarantees of the constructed
SQL queries. If it compiles it is reasonably assured to be correct.
When not necessary for pretty printing as a valid SQL blanks and such are
skipped in the grammar definition.
* SumType is used when possible.
* None is the first member of a SumType when the node is optional.
* Literals are used as is.
* All nodes have a toString.