return stmt;
}
public OracleDeleteStatement parseDeleteStatement() {
OracleDeleteStatement deleteStatement = new OracleDeleteStatement();
if (lexer.token() == Token.DELETE) {
lexer.nextToken();
if (lexer.token() == Token.COMMENT) {
lexer.nextToken();
}
parseHints(deleteStatement.getHints());
if (lexer.token() == (Token.FROM)) {
lexer.nextToken();
}
if (identifierEquals("ONLY")) {
lexer.nextToken();
accept(Token.LPAREN);
SQLName tableName = exprParser.name();
deleteStatement.setTableName(tableName);
accept(Token.RPAREN);
} else {
SQLName tableName = exprParser.name();
deleteStatement.setTableName(tableName);
}
deleteStatement.setAlias(as());
}
if (lexer.token() == (Token.WHERE)) {
lexer.nextToken();
deleteStatement.setWhere(this.exprParser.expr());
}
if (lexer.token() == Token.RETURNING) {
OracleReturningClause clause = this.parseReturningClause();
deleteStatement.setReturning(clause);
}
if (identifierEquals("RETURN") || identifierEquals("RETURNING")) {
throw new ParserException("TODO");
}