lexer.nextToken();
if (lexer.token() == Token.LPAREN) {
lexer.nextToken();
OracleAlterTableAddColumn item = new OracleAlterTableAddColumn();
for (;;) {
SQLColumnDefinition columnDef = this.exprParser.parseColumn();
item.getColumns().add(columnDef);
if (lexer.token() == Token.COMMA) {
lexer.nextToken();
continue;
}
break;
}
accept(Token.RPAREN);
stmt.getItems().add(item);
} else if (lexer.token() == Token.CONSTRAINT) {
stmt.getItems().add(parseConstaint());
} else {
throw new ParserException("TODO : " + lexer.token() + " " + lexer.stringVal());
}
continue;
} else if (identifierEquals("MOVE")) {
lexer.nextToken();
if (identifierEquals("TABLESPACE")) {
lexer.nextToken();
OracleAlterTableMoveTablespace item = new OracleAlterTableMoveTablespace();
item.setName(this.exprParser.name());
stmt.getItems().add(item);
} else {
throw new ParserException("TODO : " + lexer.token() + " " + lexer.stringVal());
}
} else if (identifierEquals("RENAME")) {
stmt.getItems().add(parseAlterTableRename());
} else if (identifierEquals("MODIFY")) {
lexer.nextToken();
if (lexer.token() == Token.LPAREN) {
lexer.nextToken();
OracleAlterTableModify item = new OracleAlterTableModify();
for (;;) {
SQLColumnDefinition columnDef = this.exprParser.parseColumn();
item.getColumns().add(columnDef);
if (lexer.token() == Token.COMMA) {
lexer.nextToken();
continue;
}
break;
}
accept(Token.RPAREN);
stmt.getItems().add(item);
} else {
throw new ParserException("TODO : " + lexer.token() + " " + lexer.stringVal());
}
continue;
} else if (identifierEquals("SPLIT")) {
parseAlterTableSplit(stmt);
continue;
} else if (lexer.token() == Token.TRUNCATE) {
lexer.nextToken();
if (identifierEquals("PARTITION")) {
lexer.nextToken();
OracleAlterTableTruncatePartition item = new OracleAlterTableTruncatePartition();
item.setName(this.exprParser.name());
stmt.getItems().add(item);
} else {
throw new ParserException("TODO : " + lexer.token() + " " + lexer.stringVal());
}
continue;