← Winnitude! Search  ·  Reader Mode (1308 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 46 LINKS

Implement INSERT and UPDATE parsing by gpittarelli · Pull Request #10 · JavaScriptor/js-sql-parser

Repository navigation

Implement INSERT and UPDATE parsing - #10


Open
gpittarelli wants to merge 3 commits into JavaScriptor:master from gpittarelli:master
Open

Implement INSERT and UPDATE parsing #10 gpittarelli wants to merge 3 commits into JavaScriptor:master from gpittarelli:master

Conversation

gpittarelli commented Apr 10, 2018 · edited Loading



Copy link Copy Markdown

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 force-pushed the master branch from 07557f3 to 344c350
Compare
April 10, 2018 01:31 Implement UPDATE c4b1c55 gpittarelli force-pushed the master branch from 344c350 to bec7988
Compare
April 10, 2018 01:32 Implement INSERT 84f4402 gpittarelli force-pushed the master branch from bec7988 to 84f4402
Compare
April 10, 2018 01:57 albin3 added the enhancement label Apr 11, 2018

albin3 commented Apr 11, 2018



Copy link Copy Markdown
Member

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

Handle VALUES in ON DUPLICATE KEY UPDATE queries 8bc20b0

albin3 commented Jul 15, 2018



Copy link Copy Markdown
Member

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.
Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment

Labels

enhancement

2 participants