throw new ParserException("TODO " + lexer.token());
}
public SQLStatement parseCreateIndex() throws ParserException {
MySqlCreateIndexStatement stmt = new MySqlCreateIndexStatement();
if (lexer.token() == Token.UNIQUE) {
stmt.setType("UNIQUE");
lexer.nextToken();
} else if (identifierEquals("FULLTEXT")) {
stmt.setType("FULLTEXT");
lexer.nextToken();
} else if (identifierEquals("SPATIAL")) {
stmt.setType("SPATIAL");
lexer.nextToken();
}
accept(Token.INDEX);
stmt.setName(this.exprParser.name());
parseCreateIndexUsing(stmt);
accept(Token.ON);
stmt.setTable(this.exprParser.name());
accept(Token.LPAREN);
for (;;) {
SQLSelectOrderByItem item = this.exprParser.parseSelectOrderByItem();
stmt.getItems().add(item);
if (lexer.token() == Token.COMMA) {
lexer.nextToken();
continue;
}
break;