Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 168 additions & 2 deletions crates/squawk_syntax/src/ast/generated/nodes.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 19 additions & 7 deletions crates/squawk_syntax/src/postgresql.ungram
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ LikeClause =
'like'

WhereClause =
'where'
'where' Expr

GroupByClause =
'group' 'by' ('all' | 'distinct') (GroupingRollup | GroupingCube | GroupingSets | GroupingExpr)
Expand Down Expand Up @@ -539,7 +539,7 @@ DistinctClause =

Target =
'*'
| Expr
| (Expr ('as' Name)?)

TargetList =
Target (',' Target)*
Expand Down Expand Up @@ -567,13 +567,13 @@ UsingClause =
'using'

Alias =
'as'?
'as'? ColumnList?

SequenceOptionList =
'(' ')'

ColumnList =
'(' ')'
'(' (Column (',' Column)*) ')'

ConstraintIncludeClause =
'include'
Expand Down Expand Up @@ -613,7 +613,7 @@ JoinUsingClause =
'using' ColumnList Alias?

Join =
'natural'? JoinType (using_clause:JoinUsingClause | OnClause)?
'natural'? JoinType FromItem (using_clause:JoinUsingClause | OnClause)?

JoinExpr =
(FromItem | JoinExpr) Join
Expand All @@ -625,6 +625,7 @@ ParenSelect =
')'

Select =
WithClause?
SelectClause
FromClause?
WhereClause?
Expand Down Expand Up @@ -1036,8 +1037,16 @@ Materialized =
NotMaterialized =
'not' 'materialized'

WithQuery =
Select
| Values
| Insert
| Update
| Delete
| Merge

WithTable =
'with' (Materialized | NotMaterialized)?
Name ColumnList? 'as'? (Materialized | NotMaterialized)? '(' query:WithQuery ')'

WithClause =
'with' 'recursive'? (WithTable (',' WithTable)*)
Expand Down Expand Up @@ -1092,7 +1101,10 @@ OrderByClause =
'order' 'by' (SortBy (',' SortBy)*)

FromItem =
'only'? NameRef
'only'? NameRef Alias?
| 'lateral'? ParenSelect Alias?
| 'lateral'? CallExpr Alias?
| 'lateral'? 'rows' 'from' '(' CallExpr ')' Alias?

FromClause =
'from'
Expand Down
Loading