Expression represents a date or time. It supports the following identifiers:
CURRENT_DATE: This function returns the value of current date on the database server.
CURRENT_TIME: This function returns the value of current time on the database server.
CURRENT_TIMESTAMP: This function returns the value of current timestamp on the database server.
functions_returning_datetime ::= CURRENT_DATE | CURRENT_TIME | CURRENT_TIMESTAMPThe JDBC escape syntax may be used for the specification of date, time, and timestamp literals.
expression ::= {d 'yyyy-mm-dd'} | {t 'hh:mm:ss'} | {ts 'yyyy-mm-dd hh:mm:ss.f...'}| Modifier and Type | Field and Description |
|---|---|
| private String | identifier
The actual identifier found in the string representation of the JPQL query. |
| 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 | addOrderedChildrenTo(List<Expression>
The list used to store the string representation of this children)AbstractExpressionOverrides org. AbstractExpression to the given list.
|
| public String | Returns: The identifier that was actually parsedReturns the actual identifier found in the string representation of the JPQL query, which has the actual case that was used. |
| public JPQLQueryBNF | getQueryBNF()
Implements org. Expression.
|
| public String | getText()
Overrides org. AbstractExpression, which can be used in various
ways, it can be a keyword, a literal, etc.
|
| public boolean | |
| public boolean | |
| public boolean | isCurrentTimestamp()
Determines whether this |
| public boolean | isJDBCDate()
Determines whether this |
| 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.
|
| private String | |
| private void | |
| public String | toActualText()
Overrides org. Implements org. Expression, which needs to include any
characters that are considered virtual, i.e. that was parsed when the query is incomplete and
is needed for functionality like content assist.
|
| public String | toParsedText()
Overrides org. Implements org. Expression and its children.
|
| 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.
|
| identifier | back to summary |
|---|---|
| private String identifier The actual identifier found in the string representation of the JPQL query. | |
| DateTime | back to summary |
|---|---|
| public DateTime(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
| |
| addOrderedChildrenTo | back to summary |
|---|---|
| protected void addOrderedChildrenTo(List<Expression> children) Overrides org. Doc from org. Adds the children of this
| |
| getActualIdentifier | back to summary |
|---|---|
| public String getActualIdentifier() Returns the actual identifier found in the string representation of the JPQL query, which has the actual case that was used.
| |
| getQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF getQueryBNF() Implements org. Doc from org. Returns the BNF of this
| |
| getText | back to summary |
|---|---|
| public String getText() Overrides org. Doc from org. Returns the encapsulated text of this
| |
| isCurrentDate | back to summary |
|---|---|
| public boolean isCurrentDate() Determines whether this
| |
| isCurrentTime | back to summary |
|---|---|
| public boolean isCurrentTime() Determines whether this
| |
| isCurrentTimestamp | back to summary |
|---|---|
| public boolean isCurrentTimestamp() Determines whether this
| |
| isJDBCDate | back to summary |
|---|---|
| public boolean isJDBCDate() Determines whether this
| |
| 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
| |
| parseIdentifier | back to summary |
|---|---|
| private String parseIdentifier(WordParser wordParser) | |
| parseJDBCEscapeFormat | back to summary |
|---|---|
| private void parseJDBCEscapeFormat(WordParser wordParser) | |
| toActualText | back to summary |
|---|---|
| public String toActualText() Overrides org. Implements org. Doc from org. Generates a string representation of this
| |
| toParsedText | back to summary |
|---|---|
| public String toParsedText() Overrides org. Implements org. Doc from org. Returns a string representation of this
| |
| toParsedText | back to summary |
|---|---|
| protected void toParsedText(StringBuilder writer, boolean actual) Implements abstract org. Doc from org. Generates a string representation of this
| |