} else if (lexer.token() == Token.DROP) {
lexer.nextToken();
if (identifierEquals("COLUMN")) {
lexer.nextToken();
}
SQLAlterTableDropColumnItem item = new SQLAlterTableDropColumnItem();
item.setColumnName(this.exprParser.name());
stmt.getItems().add(item);
} else if (identifierEquals("DISABLE")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("ENABLE")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("RENAME")) {
lexer.nextToken();
MySqlRenameTableStatement renameStmt = new MySqlRenameTableStatement();
MySqlRenameTableStatement.Item item = new MySqlRenameTableStatement.Item();
item.setName(stmt.getTableSource().getExpr());
item.setTo(this.exprParser.name());
renameStmt.getItems().add(item);
return renameStmt;
} else if (lexer.token() == Token.ORDER) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("CONVERT")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (lexer.token() == Token.DEFAULT) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("DISCARD")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("IMPORT")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("FORCE")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("TRUNCATE")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("COALESCE")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("REORGANIZE")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("EXCHANGE")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("ANALYZE")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("CHECK")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("OPTIMIZE")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("REBUILD")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("REPAIR")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("REMOVE")) {
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("ENGINE")) {
lexer.nextToken();
accept(Token.EQ);
stmt.getItems().add(new MySqlAlterTableOption("ENGINE", lexer.stringVal()));
lexer.nextToken();
} else if (identifierEquals("COLLATE")) {
lexer.nextToken();
accept(Token.EQ);
stmt.getItems().add(new MySqlAlterTableOption("COLLATE", lexer.stringVal()));
lexer.nextToken();
} else if (identifierEquals("PACK_KEYS")) {
lexer.nextToken();
accept(Token.EQ);
if (identifierEquals("PACK")) {
lexer.nextToken();
accept(Token.ALL);
stmt.getItems().add(new MySqlAlterTableOption("PACK_KEYS", "PACK ALL"));
} else {
stmt.getItems().add(new MySqlAlterTableOption("PACK_KEYS", lexer.stringVal()));
lexer.nextToken();
}
} else if (identifierEquals("CHARACTER")) {
lexer.nextToken();
accept(Token.SET);
accept(Token.EQ);
MySqlAlterTableCharacter item = new MySqlAlterTableCharacter();
item.setCharacterSet(this.exprParser.primary());
if (lexer.token() == Token.COMMA) {
lexer.nextToken();
acceptIdentifier("COLLATE");
accept(Token.EQ);
item.setCollate(this.exprParser.primary());
}
stmt.getItems().add(item);
} else {
break;
}