js-sql-parser icon indicating copy to clipboard operation
js-sql-parser copied to clipboard

Implement INSERT and UPDATE parsing

Open gpittarelli opened this issue 6 years ago • 2 comments

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)

gpittarelli avatar Apr 10 '18 01:04 gpittarelli

Great, i'm a little busy these days, i will review it later.

albin3 avatar Apr 11 '18 17:04 albin3

hi, @gpittarelli .

I reviewed the insert part in this pr and there are something need to change / some questions need to confirm:

  1. following https://dev.mysql.com/doc/refman/5.7/en/insert.html , simple_table_factor grammar may be should be replaced by identifier.
  2. more test cases are needed for for the new code.
  3. 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.

albin3 avatar Jul 15 '18 07:07 albin3