File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
main/javacc/net/sf/jsqlparser/parser
test/java/net/sf/jsqlparser/test/insert Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -514,7 +514,7 @@ String RelObjectName():
514
514
| tk=<K_CAST> | tk=<K_DO> | tk=<K_EXTRACT> | tk=<K_FIRST> | tk=<K_FOLLOWING>
515
515
| tk=<K_LAST> | tk=<K_MATERIALIZED> | tk=<K_NULLS> | tk=<K_PARTITION> | tk=<K_RANGE>
516
516
| tk=<K_ROW> | tk=<K_ROWS> | tk=<K_SIBLINGS> | tk=<K_VALUE> | tk=<K_XML>
517
- | tk=<K_COLUMN> | tk=<K_REPLACE> | tk=<K_TRUNCATE> )
517
+ | tk=<K_COLUMN> | tk=<K_REPLACE> | tk=<K_TRUNCATE> | tk=<K_KEY> )
518
518
519
519
{ return tk.image; }
520
520
}
Original file line number Diff line number Diff line change @@ -131,4 +131,10 @@ public void testInsertWithSelect() throws JSQLParserException {
131
131
assertSqlCanBeParsedAndDeparsed ("INSERT INTO mytable (mycolumn) WITH a AS (SELECT mycolumn FROM mytable) SELECT mycolumn FROM a" );
132
132
assertSqlCanBeParsedAndDeparsed ("INSERT INTO mytable (mycolumn) (WITH a AS (SELECT mycolumn FROM mytable) SELECT mycolumn FROM a)" );
133
133
}
134
+
135
+ @ Test
136
+ public void testInsertWithKeywords () throws JSQLParserException {
137
+ assertSqlCanBeParsedAndDeparsed ("INSERT INTO kvPair (value, key) VALUES (?, ?)" );
138
+ }
139
+
134
140
}
You can’t perform that action at this time.
0 commit comments