37 lines
720 B
Standard ML
37 lines
720 B
Standard ML
type query = Query of select_stmt
|
|
and select_stmt =
|
|
| Select of column list * table list
|
|
and column =
|
|
| Asterisk
|
|
| Column of string
|
|
and table =
|
|
| Table of string
|
|
| Join of table * join_type * table * condition option
|
|
and join_type =
|
|
| Inner
|
|
| Left
|
|
| Right
|
|
| Full
|
|
| Cross
|
|
| Union
|
|
| Natural
|
|
and condition =
|
|
| Condition of string * predicate
|
|
| And of condition * condition
|
|
| Or of condition * condition
|
|
| Not of condition
|
|
and predicate =
|
|
| Comparison of operator * string
|
|
| Between of string * string
|
|
and operator =
|
|
| Equals
|
|
| NotEquals
|
|
| LessThan
|
|
| GreaterThan
|
|
| LessEquals
|
|
| GreaterEquals
|
|
and filter =
|
|
| Filter of string
|
|
and search_condition =
|
|
| Search of string
|