use of com.alibaba.druid.sql.dialect.oracle.ast.clause.FlashbackQueryClause.AsOfFlashbackQueryClause in project druid by alibaba.
the class OracleSelectParser method flashback.
private FlashbackQueryClause flashback() {
if (lexer.token() == Token.AS) {
lexer.nextToken();
}
if (lexer.token() == Token.OF) {
lexer.nextToken();
if (identifierEquals("SCN")) {
AsOfFlashbackQueryClause clause = new AsOfFlashbackQueryClause();
clause.setType(AsOfFlashbackQueryClause.Type.SCN);
lexer.nextToken();
clause.setExpr(exprParser.expr());
return clause;
} else if (identifierEquals("SNAPSHOT")) {
lexer.nextToken();
accept(Token.LPAREN);
AsOfSnapshotClause clause = new AsOfSnapshotClause();
clause.setExpr(this.expr());
accept(Token.RPAREN);
return clause;
} else {
AsOfFlashbackQueryClause clause = new AsOfFlashbackQueryClause();
acceptIdentifier("TIMESTAMP");
clause.setType(AsOfFlashbackQueryClause.Type.TIMESTAMP);
clause.setExpr(exprParser.expr());
return clause;
}
}
return null;
}
Aggregations