js-sql-parser
js-sql-parser copied to clipboard
Implement INSERT and UPDATE parsing
Implements parsing for INSERT and UPDATE queries, per the MySQL 5.7 grammar. Includes pretty printing + test cases.
(Note: for my own purposes, I've published this branch under @gpittarelli/js-sql-parser
)
Great, i'm a little busy these days, i will review it later.
hi, @gpittarelli .
I reviewed the insert
part in this pr and there are something need to change / some questions need to confirm:
- following https://dev.mysql.com/doc/refman/5.7/en/insert.html ,
simple_table_factor
grammar may be should be replaced byidentifier
. - more test cases are needed for for the new code.
- suggestion: format the code more similar with document in https://dev.mysql.com/doc/refman/5.7/en/insert.html , such as there are three insert grammars in document, we also write it into three lines. So, it's more readable.