Skip to content

Commit

Permalink
fix: parser mysql unique index error
Browse files Browse the repository at this point in the history
  • Loading branch information
zhum@aotain.com committed Sep 5, 2023
1 parent 4356ab2 commit 4ad18f1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -5373,6 +5373,20 @@ CreateTable CreateTable():
","

(
LOOKAHEAD(3) (
<K_UNIQUE> <K_INDEX>
sk3=RelObjectName()
/* colNames=ColumnsNamesList() */
colNames = ColumnNamesWithParamsList()
{ idxSpec.clear(); }
( parameter=CreateParameter() { idxSpec.addAll(parameter); } )*
{
index = new Index().withType("UNIQUE").withName(sk3).withColumns(colNames).withIndexSpec(new ArrayList<String>(idxSpec));
indexes.add(index);
}
)
|

LOOKAHEAD(3) (
tk=<K_INDEX>
sk3=RelObjectName()
Expand Down

0 comments on commit 4ad18f1

Please sign in to comment.