An AS OF clause is part of a flashback query, which provides ways to view
past states of database objects, or to return database objects to a previous state, without using
traditional point-in-time recovery.
Specify AS OF to retrieve the single version of the rows returned by the
query at a particular change number (SCN) or timestamp. If you specify SCN, then the expression
must evaluate to a number. If you specify TIMESTAMP, then the expression must
evaluate to a timestamp value. Oracle Database returns rows as they existed at the specified
system change number or time.
asof_clause ::= AS OF { SCN | TIMESTAMP } scalar_expression| Modifier and Type | Field and Description |
|---|---|
| private AbstractExpression | expression
The |
| private boolean | hasSpaceAfterCategory
Determines whether a whitespace was found after either |
| private boolean | hasSpaceAfterIdentifier
Determines whether a whitespace was found after |
| private String | identifier
The actual identifier found in the string representation of the JPQL query. |
| private String | scnIdentifier
The actual |
| private String | timestampIdentifier
The actual |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(ExpressionVisitor
The visitor)ExpressionVisitor to visit this objectImplements org. Expression by the given visitor.
|
| public void | acceptChildren(ExpressionVisitor
The visitor)visitor to visit the children of this object.Implements org. Expression.
|
| protected void | addChildrenTo(Collection<Expression>
The collection used to store the children children)Overrides org. AbstractExpression to the given collection.
|
| protected void | addOrderedChildrenTo(List<Expression>
The list used to store the string representation of this children)AbstractExpressionOverrides org. AbstractExpression to the given list.
|
| public JPQLQueryBNF | findQueryBNF(Expression
The expression)Expression that is a descendant of this oneOverrides org. Implements org. JPQLQueryBNF that represents the fragment of this Expression
that was used when parsing the given Expression.
|
| public String | Returns: The AS OF identifier that was actually parsedReturns the actual AS OF identifier found in the string representation of the JPQL query, which has the actual case that was used. |
| public String | Returns: The SCN identifier that was actually parsed, or an empty string if it was not parsedReturns the actual SCN identifier found in the string representation of the JPQL query, which has the actual case that was used. |
| public String | Returns: The TIMESTAMP identifier that was actually parsed, or an empty string if it was not parsedReturns the actual TIMESTAMP identifier found in the string representation of the JPQL query, which has the actual case that was used. |
| public Expression | Returns: TheExpression that was parsed representing the timestamp or change numberReturns the |
| public JPQLQueryBNF | getQueryBNF()
Implements org. Expression.
|
| public boolean | Returns: true if the timestamp or change number was parsed; false otherwiseDetermines whether the |
| public boolean | Returns: true if the identifier SCN was parsed; false otherwiseDetermines whether the identifier SCN was part of the query. |
| public boolean | Returns: true if there was a whitespace after SCN or TIMESTAMP;
false otherwiseDetermines whether a whitespace was found after either SCN or |
| public boolean | Returns: true if there was a whitespace after AS OF; false otherwiseDetermines whether a whitespace was found after AS OF. |
| public boolean | Returns: true if the identifier TIMESTAMP was parsed; false otherwiseDetermines whether the identifier TIMESTAMP was part of the query. |
| protected void | parse(WordParser
The text to parse based on the current position of the cursor wordParser, boolean Determines whether the parsing system should be tolerant, meaning if it should
try to parse invalid or incomplete queries tolerant)Implements abstract org. WordParser.
|
| protected void | toParsedText(StringBuilder
The buffer used to append this writer, boolean Expression's string representationDetermines whether the string representation should represent what was parsed,
i.e. include any "virtual" whitespace (such as ending whitespace) and the actual case of the
JPQL identifiers actual)Implements abstract org. Expression, including its children,
if it has any.
|
| expression | back to summary |
|---|---|
| private AbstractExpression expression The | |
| hasSpaceAfterCategory | back to summary |
|---|---|
| private boolean hasSpaceAfterCategory Determines whether a whitespace was found after either | |
| hasSpaceAfterIdentifier | back to summary |
|---|---|
| private boolean hasSpaceAfterIdentifier Determines whether a whitespace was found after | |
| identifier | back to summary |
|---|---|
| private String identifier The actual identifier found in the string representation of the JPQL query. | |
| scnIdentifier | back to summary |
|---|---|
| private String scnIdentifier The actual | |
| timestampIdentifier | back to summary |
|---|---|
| private String timestampIdentifier The actual | |
| AsOfClause | back to summary |
|---|---|
| public AsOfClause(AbstractExpression parent) Creates a new
| |
| accept | back to summary |
|---|---|
| public void accept(ExpressionVisitor visitor) Implements org. Doc from org. Visits this
| |
| acceptChildren | back to summary |
|---|---|
| public void acceptChildren(ExpressionVisitor visitor) Implements org. Doc from org. Visits the children of this
This does not traverse the
| |
| addChildrenTo | back to summary |
|---|---|
| protected void addChildrenTo(Collection<Expression> children) Overrides org. Doc from org. Adds the children of this
| |
| addOrderedChildrenTo | back to summary |
|---|---|
| protected void addOrderedChildrenTo(List<Expression> children) Overrides org. Doc from org. Adds the children of this
| |
| findQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF findQueryBNF(Expression expression) Overrides org. Implements org. Doc from org. Retrieves the
| |
| getActualIdentifier | back to summary |
|---|---|
| public String getActualIdentifier() Returns the actual AS OF identifier found in the string representation of the JPQL query, which has the actual case that was used.
| |
| getActualScnIdentifier | back to summary |
|---|---|
| public String getActualScnIdentifier() Returns the actual SCN identifier found in the string representation of the JPQL query, which has the actual case that was used.
| |
| getActualTimestampIdentifier | back to summary |
|---|---|
| public String getActualTimestampIdentifier() Returns the actual TIMESTAMP identifier found in the string representation of the JPQL query, which has the actual case that was used.
| |
| getExpression | back to summary |
|---|---|
| public Expression getExpression() Returns the
| |
| getQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF getQueryBNF() Implements org. Doc from org. Returns the BNF of this
| |
| hasExpression | back to summary |
|---|---|
| public boolean hasExpression() Determines whether the
| |
| hasScn | back to summary |
|---|---|
| public boolean hasScn() Determines whether the identifier SCN was part of the query.
| |
| hasSpaceAfterCategory | back to summary |
|---|---|
| public boolean hasSpaceAfterCategory() Determines whether a whitespace was found after either SCN or
| |
| hasSpaceAfterIdentifier | back to summary |
|---|---|
| public boolean hasSpaceAfterIdentifier() Determines whether a whitespace was found after AS OF.
| |
| hasTimestamp | back to summary |
|---|---|
| public boolean hasTimestamp() Determines whether the identifier TIMESTAMP was part of the query.
| |
| parse | back to summary |
|---|---|
| protected void parse(WordParser wordParser, boolean tolerant) Implements abstract org. Doc from org. Parses the query by starting at the current position, which is part of the given
| |
| toParsedText | back to summary |
|---|---|
| protected void toParsedText(StringBuilder writer, boolean actual) Implements abstract org. Doc from org. Generates a string representation of this
| |