File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/main/jjtree/net/sf/jsqlparser/parser Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -227,6 +227,7 @@ TOKEN: /* SQL Keywords. prefixed with K_ to avoid name clashes */
227
227
| <K_MATCHED: "MATCHED">
228
228
| <K_CASCADE: "CASCADE">
229
229
| <K_RESTRICT: "RESTRICT">
230
+ | <K_DUPLICATE: "DUPLICATE">
230
231
}
231
232
232
233
TOKEN : /* Numeric Constants */
@@ -493,8 +494,8 @@ Insert Insert():
493
494
)
494
495
)
495
496
496
- [ "ON DUPLICATE KEY UPDATE"
497
- { useDuplicate = true;}
497
+ [ <K_ON> <K_DUPLICATE> <K_KEY> <K_UPDATE>
498
+ { useDuplicate = true; }
498
499
tableColumn=Column() "=" exp=SimpleExpression()
499
500
{
500
501
duplicateUpdateColumns = new ArrayList<Column>();
@@ -1194,12 +1195,12 @@ Join JoinerExpression():
1194
1195
right=FromItem()
1195
1196
1196
1197
1197
- [
1198
- ( <K_ON> onExpression=Expression() { join.setOnExpression(onExpression); } )
1198
+ [
1199
+ LOOKAHEAD(2) ( ( <K_ON> onExpression=Expression() { join.setOnExpression(onExpression); } )
1199
1200
|
1200
1201
( <K_USING> "(" tableColumn=Column() { columns = new ArrayList(); columns.add(tableColumn); }
1201
1202
("," tableColumn=Column() { columns.add(tableColumn); } )* ")"
1202
- { join.setUsingColumns(columns); } )
1203
+ { join.setUsingColumns(columns); } ))
1203
1204
]
1204
1205
{
1205
1206
join.setRightItem(right);
You can’t perform that action at this time.
0 commit comments