This repository was archived by the owner on Jul 15, 2021. It is now read-only.
Commit d641e6d
committed
A lot of cleanup and refactoring utility funcs.
Got rid of a bunch of unused code, cleaned up the utility
functions, moved the utilities back into the grammar.pegjs file to
avoid the extra magic of injecting the import statement into the
built parser.
Fixed the binary expression logic to properly handle cases such
as:
``` sql
SELECT * FROM t where -1 * (2 + 3);
SELECT * FROM t where 3 + 4 * 5 > 20;
SELECT * FROM t where v1 = ((v2 * 5) - v3);
```
Updated SQL in specs to contain correct ASTs for specs related
to expression grouping.
Should have broken this into several commits but the changes
are too intertwined to easily break apart now.
Refs #20
Refs #31 parent 8df7990 commit d641e6d
File tree
17 files changed
+774
-675
lines changed- src
- test
- core
- json
- create-trigger
- expressions
- select
- update
- sql/expressions
17 files changed
+774
-675
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | 110 | | |
| 111 | + | |
113 | 112 | | |
114 | 113 | | |
115 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
0 commit comments