@@ -228,6 +228,10 @@ TOKEN: /* SQL Keywords. prefixed with K_ to avoid name clashes */
228228| <K_CASCADE: "CASCADE">
229229| <K_RESTRICT: "RESTRICT">
230230| <K_DUPLICATE: "DUPLICATE">
231+ | <K_LOW_PRIORITY : "LOW_PRIORITY">
232+ | <K_DELAYED : "DELAYED">
233+ | <K_HIGH_PRIORITY : "HIGH_PRIORITY">
234+ | <K_IGNORE : "IGNORE">
231235}
232236
233237TOKEN : /* Numeric Constants */
@@ -467,9 +471,18 @@ Insert Insert():
467471 boolean useDuplicate = false;
468472 List<Column> duplicateUpdateColumns = null;
469473 List<Expression> duplicateUpdateExpressionList = null;
474+ Token tk = null;
475+ String modifierPriority = null;
476+ boolean modifierIgnore = false;
470477}
471478{
472- <K_INSERT> [<K_INTO>] table=Table()
479+ <K_INSERT>
480+ [(tk = <K_LOW_PRIORITY> | tk = <K_DELAYED> | tk = <K_HIGH_PRIORITY>)
481+ {if (tk!=null)
482+ modifierPriority = tk.image.toUpperCase();
483+ }]
484+ [<K_IGNORE>{ modifierIgnore = true; }]
485+ [<K_INTO>] table=Table()
473486
474487
475488 [LOOKAHEAD(2) "(" tableColumn=Column() { columns.add(tableColumn); } ("," tableColumn=Column() { columns.add(tableColumn); } )* ")" ]
@@ -530,6 +543,8 @@ Insert Insert():
530543 insert.setDuplicateUpdateColumns(duplicateUpdateColumns);
531544 insert.setDuplicateUpdateExpressionList(duplicateUpdateExpressionList);
532545 insert.setReturningExpressionList(returning);
546+ insert.setModifierPriority(modifierPriority);
547+ insert.setModifierIgnore(modifierIgnore);
533548 return insert;
534549 }
535550}
0 commit comments