SELECT query is an operation that retrieves data from one or more tables or
views.
select_statement ::= select_clause
from_clause
[where_clause]
[groupby_clause]
[having_clause]
[orderby_clause]select_statement ::= select_clause
from_clause
[where_clause]
[groupby_clause]
[having_clause]
[orderby_clause]
{union_clause}*select_statement ::= [select_clause]
from_clause
[where_clause]
[groupby_clause]
[having_clause]
[orderby_clause]
{union_clause}*FromClause, GroupByClause, HavingClause, HierarchicalQueryClause, OrderByClause, SelectClause, UnionClause, WhereClause
| Modifier and Type | Field and Description |
|---|---|
| private boolean | hasSpaceBeforeOrderBy
Determines whether there is a whitespace after the select statement parsed by the superclass and the ORDER BY identifier. |
| private boolean | hasSpaceBeforeUnion
Determines whether there is a whitespace after the select statement parsed by the superclass and the UNION identifier. |
| private AbstractExpression | orderByClause
The ORDER BY expression. |
| private AbstractExpression | unionClauses
The UNION expression. |
| Access | Constructor and Description |
|---|---|
| public | SelectStatement(AbstractExpression
The parent of this expression parent)Creates a new |
| 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.Overrides org. 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.
|
| protected FromClause | buildFromClause()
Implements abstract org. |
| protected SelectClause | buildSelectClause()
Implements abstract org. |
| 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 Expression | Returns: The expression representing the ORDER BY clauseReturns the |
| public JPQLQueryBNF | getQueryBNF()
Implements org. Expression.
|
| public Expression | Returns: TheExpression representing the UNION clausesReturns the |
| public boolean | Returns: true if the query that got parsed had the ORDER BY clauseDetermines whether the ORDER BY clause is defined or not. |
| public boolean | Returns: true if there was a whitespace before the ORDER BY; false
otherwiseDetermines whether a whitespace was parsed before the ORDER BY clause. |
| public boolean | Returns: true if there was a whitespace before the UNION;
false otherwiseDetermines whether a whitespace was parsed before the UNION clause. |
| public boolean | Returns: true if the query that got parsed had the UNION clausesDetermines whether at least one UNION clause was defined. |
| protected boolean | isParsingComplete(WordParser
The text to parse based on the current position of the cursor wordParser, String The word that was retrieved from the given text, which is the first word in the text word, Expression The expression)Expression that has already been parsedOverrides org. |
| 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)Overrides 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)Overrides org. Expression, including its children,
if it has any.
|
| hasSpaceBeforeOrderBy | back to summary |
|---|---|
| private boolean hasSpaceBeforeOrderBy Determines whether there is a whitespace after the select statement parsed by the superclass and the ORDER BY identifier. | |
| hasSpaceBeforeUnion | back to summary |
|---|---|
| private boolean hasSpaceBeforeUnion Determines whether there is a whitespace after the select statement parsed by the superclass and the UNION identifier. | |
| orderByClause | back to summary |
|---|---|
| private AbstractExpression orderByClause The ORDER BY expression. | |
| unionClauses | back to summary |
|---|---|
| private AbstractExpression unionClauses The UNION expression. | |
| SelectStatement | back to summary |
|---|---|
| public SelectStatement(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) Overrides org. 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
| |
| buildFromClause | back to summary |
|---|---|
| protected FromClause buildFromClause() Implements abstract org. Doc from org. Creates the expression representing the from clause of this select statement.
| |
| buildSelectClause | back to summary |
|---|---|
| protected SelectClause buildSelectClause() Implements abstract org. Doc from org. Creates the expression representing the select clause of this select statement.
| |
| findQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF findQueryBNF(Expression expression) Overrides org. Implements org. Doc from org. Retrieves the
| |
| getOrderByClause | back to summary |
|---|---|
| public Expression getOrderByClause() Returns the
| |
| getQueryBNF | back to summary |
|---|---|
| public JPQLQueryBNF getQueryBNF() Implements org. Doc from org. Returns the BNF of this
| |
| getUnionClauses | back to summary |
|---|---|
| public Expression getUnionClauses() Returns the
| |
| hasOrderByClause | back to summary |
|---|---|
| public boolean hasOrderByClause() Determines whether the ORDER BY clause is defined or not.
| |
| hasSpaceBeforeOrderBy | back to summary |
|---|---|
| public boolean hasSpaceBeforeOrderBy() Determines whether a whitespace was parsed before the ORDER BY clause. In some cases, the space could be owned by a child of the previous clause.
| |
| hasSpaceBeforeUnion | back to summary |
|---|---|
| public boolean hasSpaceBeforeUnion() Determines whether a whitespace was parsed before the UNION clause. In some cases, the space could be owned by a child of the previous clause.
| |
| hasUnionClauses | back to summary |
|---|---|
| public boolean hasUnionClauses() Determines whether at least one UNION clause was defined.
| |
| isParsingComplete | back to summary |
|---|---|
| protected boolean isParsingComplete(WordParser wordParser, String word, Expression expression) Overrides org. Doc from org. Determines whether the parsing is complete based on what is left in the given text. The text is never empty.
| |
| parse | back to summary |
|---|---|
| protected void parse(WordParser wordParser, boolean tolerant) Overrides 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) Overrides org. Doc from org. Generates a string representation of this
| |