SELECT statement is called a query, and a query nested within
another SQL statement is called a subquery.
SelectStatement, SimpleSelectStatement
| Modifier and Type | Field and Description |
|---|---|
| private AbstractExpression | fromClause
The |
| private AbstractExpression | groupByClause
The |
| private boolean | hasSpaceAfterFrom
Determines whether there is a whitespace after the identifier |
| private boolean | hasSpaceAfterGroupBy
Determines whether there is a whitespace after the identifier |
| private boolean | hasSpaceAfterSelect
Determines whether there is a whitespace after the identifier |
| private boolean | hasSpaceAfterWhere
Determines whether there is a whitespace after the identifier |
| private AbstractExpression | havingClause
The |
| private AbstractExpression | selectClause
The |
| private AbstractExpression | whereClause
The |
| Access | Constructor and Description |
|---|---|
| protected | AbstractSelectStatement(AbstractExpression
The parent of this expression parent)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| 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.
|
| protected abstract AbstractFromClause | Returns: A new from clause,null can't be returnedCreates the expression representing the from clause of this select statement. |
| protected abstract AbstractSelectClause | Returns: A new from clause,null can't be returnedCreates the expression representing the select clause of this select statement. |
| 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 final Expression | Returns: The expression representing the FROM clauseReturns the |
| public final Expression | Returns: The expression representing the GROUP BY clauseReturns the |
| public final Expression | Returns: The expression representing the HAVING clauseReturns the |
| public final Expression | Returns: The expression representing the SELECT clauseReturns the |
| public final Expression | Returns: The expression representing the WHERE clauseReturns the |
| public final boolean | Returns: true if the query that got parsed had the FROM clauseDetermines whether the FROM clause was parsed or not. |
| public final boolean | Returns: true if the query that got parsed had the GROUP BY clauseDetermines whether the GROUP BY clause was parsed or not. |
| public final boolean | Returns: true if the query that got parsed had the HAVING clauseDetermines whether the HAVING clause was parsed or not. |
| public final boolean | Returns: true if the query that got parsed had the HAVING clauseDetermines whether the SELECT clause was parsed or not. |
| public final boolean | Returns: true if there was a whitespace after the FROM clause and owned by
this expression; false otherwiseDetermines whether a whitespace was found after the FROM clause. |
| public final boolean | Returns: true if there was a whitespace after the GROUP BY clause and owned
by this expression; false otherwiseDetermines whether a whitespace was found after the GROUP BY clause. |
| public final boolean | Returns: true if there was a whitespace after the SELECT clause and owned
by this expression; false otherwiseDetermines whether a whitespace was found after the SELECT clause. |
| public final boolean | Returns: true if there was a whitespace after the WHERE clause and owned by
this expression; false otherwiseDetermines whether a whitespace was found after the WHERE clause. |
| public final boolean | Returns: true if the query that got parsed had the WHERE clauseDetermines whether the WHERE clause is defined. |
| 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 boolean | Returns: true by default to keep the whitespace part of this expression;
false to let the parent handle itDetermines whether the whitespace following the |
| 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.
|
| fromClause | back to summary |
|---|---|
| private AbstractExpression fromClause The | |
| groupByClause | back to summary |
|---|---|
| private AbstractExpression groupByClause The | |
| hasSpaceAfterFrom | back to summary |
|---|---|
| private boolean hasSpaceAfterFrom Determines whether there is a whitespace after the identifier | |
| hasSpaceAfterGroupBy | back to summary |
|---|---|
| private boolean hasSpaceAfterGroupBy Determines whether there is a whitespace after the identifier | |
| hasSpaceAfterSelect | back to summary |
|---|---|
| private boolean hasSpaceAfterSelect Determines whether there is a whitespace after the identifier | |
| hasSpaceAfterWhere | back to summary |
|---|---|
| private boolean hasSpaceAfterWhere Determines whether there is a whitespace after the identifier | |
| havingClause | back to summary |
|---|---|
| private AbstractExpression havingClause The | |
| selectClause | back to summary |
|---|---|
| private AbstractExpression selectClause The | |
| whereClause | back to summary |
|---|---|
| private AbstractExpression whereClause The | |
| AbstractSelectStatement | back to summary |
|---|---|
| protected AbstractSelectStatement(AbstractExpression parent) Creates a new
| |
| 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
| |
| buildFromClause | back to summary |
|---|---|
| protected abstract AbstractFromClause buildFromClause() Creates the expression representing the from clause of this select statement.
| |
| buildSelectClause | back to summary |
|---|---|
| protected abstract AbstractSelectClause buildSelectClause() 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
| |
| getFromClause | back to summary |
|---|---|
| public final Expression getFromClause() Returns the
| |
| getGroupByClause | back to summary |
|---|---|
| public final Expression getGroupByClause() Returns the
| |
| getHavingClause | back to summary |
|---|---|
| public final Expression getHavingClause() Returns the
| |
| getSelectClause | back to summary |
|---|---|
| public final Expression getSelectClause() Returns the
| |
| getWhereClause | back to summary |
|---|---|
| public final Expression getWhereClause() Returns the
| |
| hasFromClause | back to summary |
|---|---|
| public final boolean hasFromClause() Determines whether the FROM clause was parsed or not.
| |
| hasGroupByClause | back to summary |
|---|---|
| public final boolean hasGroupByClause() Determines whether the GROUP BY clause was parsed or not.
| |
| hasHavingClause | back to summary |
|---|---|
| public final boolean hasHavingClause() Determines whether the HAVING clause was parsed or not.
| |
| hasSelectClause | back to summary |
|---|---|
| public final boolean hasSelectClause() Determines whether the SELECT clause was parsed or not.
| |
| hasSpaceAfterFrom | back to summary |
|---|---|
| public final boolean hasSpaceAfterFrom() Determines whether a whitespace was found after the FROM clause. In some cases, the space is owned by a child of the FROM clause.
| |
| hasSpaceAfterGroupBy | back to summary |
|---|---|
| public final boolean hasSpaceAfterGroupBy() Determines whether a whitespace was found after the GROUP BY clause. In some cases, the space is owned by a child of the GROUP BY clause.
| |
| hasSpaceAfterSelect | back to summary |
|---|---|
| public final boolean hasSpaceAfterSelect() Determines whether a whitespace was found after the SELECT clause. In some cases, the space is owned by a child of the SELECT clause.
| |
| hasSpaceAfterWhere | back to summary |
|---|---|
| public final boolean hasSpaceAfterWhere() Determines whether a whitespace was found after the WHERE clause. In some cases, the space is owned by a child of the WHERE clause.
| |
| hasWhereClause | back to summary |
|---|---|
| public final boolean hasWhereClause() Determines whether the WHERE clause is defined.
| |
| 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
| |
| shouldManageSpaceAfterClause | back to summary |
|---|---|
| protected boolean shouldManageSpaceAfterClause() Determines whether the whitespace following the
| |
| toParsedText | back to summary |
|---|---|
| protected void toParsedText(StringBuilder writer, boolean actual) Implements abstract org. Doc from org. Generates a string representation of this
| |