fix insert rowValuesList syntax

This commit is contained in:
HSunboy 2020-03-26 13:06:16 +08:00
parent 0c5f6164f4
commit 3bf241408c
7 changed files with 11 additions and 11 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "dt-sql-parser", "name": "dt-sql-parser",
"version": "3.0.3", "version": "3.0.4",
"description": "sql,hive,parser ", "description": "sql,hive,parser ",
"keywords": [ "keywords": [
"hive", "hive",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -255,7 +255,7 @@ GenericInsert_EDIT
InsertValuesList InsertValuesList
: ParenthesizedRowValuesList : ParenthesizedRowValuesList
| ParenthesizedRowValuesList ',' ParenthesizedRowValuesList | InsertValuesList ',' ParenthesizedRowValuesList
; ;
ParenthesizedRowValuesList ParenthesizedRowValuesList

View File

@ -77,7 +77,7 @@ describe('syntax test', () => {
expect(result).toBe(false); expect(result).toBe(false);
}); });
test('insert', () => { test('insert', () => {
const sql = `insert into table user1 values (1, 'a'), (2, 'b')`; const sql = `insert into table user1 values (1, 'a'), (2, 'b'), (3, 'b')`;
const result = parser.parseSyntax([sql, ''], dtSqlParser.parser.sqlType.Hive); const result = parser.parseSyntax([sql, ''], dtSqlParser.parser.sqlType.Hive);
expect(result).toBe(false); expect(result).toBe(false);
}); });