Commit 8a3239e7 authored by cznic's avatar cznic

Add documentation TODOs. Updates #155.

parent 0124d617
......@@ -1738,7 +1738,7 @@
// The result can be filtered using a WhereClause and orderd by the OrderBy
// clause.
//
// SelectStmt = "SELECT" [ "DISTINCT" ] ( "*" | FieldList ) [ "FROM" RecordSetList ]
// SelectStmt = "SELECT" [ "DISTINCT" ] ( "*" | FieldList ) [ "FROM" RecordSetList ] //TODO document missing FROM clause semantics
// [ JoinClause ] [ WhereClause ] [ GroupByClause ] [ OrderBy ] [ Limit ] [ Offset ].
//
// JoinClause = ( "LEFT" | "RIGHT" | "FULL" ) [ "OUTER" ] "JOIN" RecordSet "ON" Expression .
......@@ -1878,7 +1878,9 @@
// It is an error if the expression evaluates to a non null value of non bool
// type.
//
// WhereClause = "WHERE" Expression .
// WhereClause = "WHERE" Expression
// | "WHERE" "EXISTS" "(" SelectStmt ")" //TODO document semantics
// | "WHERE" "NOT" "EXISTS" "(" SelectStmt ")" . //TODO document semantics
//
// Recordset grouping
//
......
......@@ -222,4 +222,6 @@ UpdateStmt = "UPDATE" TableName [ "SET" ] AssignmentList [ WhereClause ] .
Values = "VALUES" "(" ExpressionList ")" {
"," "(" ExpressionList ")"
} [ "," ] .
WhereClause = "WHERE" Expression .
WhereClause = "WHERE" Expression
| "WHERE" "EXISTS" "(" SelectStmt ")"
| "WHERE" "NOT" "EXISTS" "(" SelectStmt ")" .
......@@ -3,7 +3,7 @@
//TODO Put your favorite license here
// yacc source generated by ebnf2y[1]
// at 2017-03-26 14:36:35.113818408 +0200 CEST
// at 2017-03-26 14:44:01.845463888 +0200 CEST
//
// $ ebnf2y -o ql.y -oe ql.ebnf -start StatementList -pkg ql -p _
//
......@@ -1545,6 +1545,14 @@ WhereClause:
{
$$ = []WhereClause{"WHERE", $2} //TODO 258
}
| _WHERE _EXISTS '(' SelectStmt ')'
{
$$ = []WhereClause{"WHERE", "EXISTS", "(", $4, ")"} //TODO 259
}
| _WHERE _NOT _EXISTS '(' SelectStmt ')'
{
$$ = []WhereClause{"WHERE", "NOT", "EXISTS", "(", $5, ")"} //TODO 260
}
%%
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment