This repository has been archived by the owner on Jul 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
Standard AST across all statement types (v1.0.0) #3
Milestone
Comments
nwronski
added a commit
that referenced
this issue
Jul 10, 2015
…t files and directories by type, define mocha.opts to run tests directory recursively. refs #3
nwronski
added a commit
that referenced
this issue
Jul 10, 2015
nwronski
added a commit
that referenced
this issue
Sep 29, 2015
Taking steps to remove properties that are not required in the AST such as default/null values and automatically adding obscure properties by default. Especially properties such as autoIncrement and temporary.
nwronski
added a commit
that referenced
this issue
Sep 29, 2015
Replaced grunt json with grunt rewrite to automatically generate new test JSON files for all the specs. Instead of parsing a JSON string in the spec JS file, the helper now looks for a file in the "test/json/" folder that matches the SQL file loaded from "test/sql/".
nwronski
added a commit
that referenced
this issue
Sep 29, 2015
Only include 'optimization' when it contains a value.
nwronski
added a commit
that referenced
this issue
Sep 29, 2015
Working version of "grunt rewrite-json" that also runs the specs after generating each new JSON file.
nwronski
added a commit
that referenced
this issue
Sep 29, 2015
nwronski
added a commit
that referenced
this issue
Sep 29, 2015
Still had some null values for column constraint names.
nwronski
added a commit
that referenced
this issue
Sep 29, 2015
nwronski
added a commit
that referenced
this issue
Sep 29, 2015
nwronski
added a commit
that referenced
this issue
Sep 29, 2015
Previous 0.12.0 should have been tagged beta and not set as default release. Refs #3
Hi @nwronski I was wondering if you were still working on standardising the node If you're not working on it would it be ok for me to submit pull requests to add types to the nodes? They will be quite simplistic to allow the walker to get up and running but I wouldnt mind working on the full refactor of |
nwronski
added a commit
that referenced
this issue
Oct 2, 2016
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 #3
nwronski
added a commit
that referenced
this issue
Oct 3, 2016
The root node of the AST now has `type` and `variant` properties: ``` json { "type": "statement", "variant": "list", "statement": [{ "type": "statement", "variant": "select", "statement": {} }] } ```
nwronski
added a commit
that referenced
this issue
Oct 4, 2016
Indexed columns (e.g., the column list in the `ON` part of a `CREATE INDEX` statement) and ordering expressions (e.g., the `ORDER BY` part of a `SELECT` statement) now have the following format: - When they are proceeded by an ordering term (e.g., `ASC`, `DESC`) and/or `COLLATE`, such as `ORDER BY nick ASC` - But, when it is only an expression or column name without any ordering term or `COLLATE` then it will only be the expression itself, and the implicit `"direction": "asc"` will not be added to the AST, such as `ORDER BY nick` Refs #3
nwronski
added a commit
that referenced
this issue
Oct 4, 2016
Allow dbName.tableName format in a qualified table expression.
nwronski
added a commit
that referenced
this issue
Oct 4, 2016
The definition for indexed columns and ordering expressions allows for a COLLATE part, but that is already part of the grammar for expression so it is redundant to have it explicitly added to these other rules. Refs #3
nwronski
added a commit
that referenced
this issue
Oct 4, 2016
Indexed columns (e.g., the column list in the `ON` part of a `CREATE INDEX` statement) and ordering expressions (e.g., the `ORDER BY` part of a `SELECT` statement) now have the following format: - When they are proceeded by an ordering term (e.g., `ASC`, `DESC`) and/or `COLLATE`, such as `ORDER BY nick ASC` - But, when it is only an expression or column name without any ordering term or `COLLATE` then it will only be the expression itself, and the implicit `"direction": "asc"` will not be added to the AST, such as `ORDER BY nick` Refs #3
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
ORDER BY
LIMIT
name
property across node typesMove to v2.0.0 milestonetype
andvariant
combine into singletype
propertytarget
The text was updated successfully, but these errors were encountered: