public class QueryCompilation extends Object implements Serializable
SELECT {result} FROM {from} WHERE {filter} GROUP BY {grouping} HAVING {having} ORDER BY {order} UPDATE {from} SET {update} WHERE {filter} DELETE FROM {from} WHERE {filter}
Modifier and Type | Field and Description |
---|---|
protected String |
candidateAlias
Alias for the (primary) candidate.
|
protected Class |
candidateClass
Primary candidate class.
|
protected Expression |
exprFilter
Compiled filter expression
|
protected Expression[] |
exprFrom
Compiled from expression.
|
protected Expression[] |
exprGrouping
Compiled grouping expression.
|
protected Expression |
exprHaving
Compiled having expression.
|
protected Expression[] |
exprOrdering
Compiled ordering expression.
|
protected Expression[] |
exprResult
Compiled result expression.
|
protected Expression[] |
exprUpdate
Compiled update expression.
|
protected String |
queryLanguage
Query language that this is a compilation for.
|
protected boolean |
resultDistinct
Whether the result is distinct.
|
protected boolean |
returnsSingleRow
Whether the query will return a single row.
|
protected Map<String,QueryCompilation> |
subqueryCompilations
Compilations of any subqueries, keyed by the subquery variable name.
|
protected SymbolTable |
symtbl
Compiled Symbol Table.
|
Constructor and Description |
---|
QueryCompilation(Class candidateCls,
String candidateAlias,
SymbolTable symtbl,
Expression[] results,
Expression[] froms,
Expression filter,
Expression[] groupings,
Expression having,
Expression[] orderings,
Expression[] updates) |
Modifier and Type | Method and Description |
---|---|
void |
addSubqueryCompilation(String alias,
QueryCompilation compilation)
Method to add the compilation for a subquery of this query.
|
String |
debugString(String indent) |
String |
getCandidateAlias()
Accessor for the candidate alias.
|
Class |
getCandidateClass()
Accessor for the candidate class.
|
QueryCompilation |
getCompilationForSubquery(String alias)
Accessor for the compilation for a subquery with the specified alias.
|
Expression |
getExprFilter()
Accessor for the filter expression.
|
Expression[] |
getExprFrom()
Accessor for any from expression(s).
|
Expression[] |
getExprGrouping()
Accessor for any grouping expression(s).
|
Expression |
getExprHaving()
Accessor for any having expression.
|
Expression[] |
getExprOrdering()
Accessor for any ordering expression(s).
|
Expression[] |
getExprResult()
Accessor for any result expression(s).
|
Expression[] |
getExprUpdate()
Accessor for any update expression(s).
|
ParameterExpression |
getParameterExpressionForPosition(int pos) |
String |
getQueryLanguage() |
boolean |
getResultDistinct() |
Class[] |
getResultTypes()
Accessor for the types of the result row components.
|
String[] |
getSubqueryAliases()
Accessor for the aliases for any subqueries in this compilation.
|
SymbolTable |
getSymbolTable()
Accessor for the symbol table for the query.
|
boolean |
returnsSingleRow()
Accessor for whether this query will return a single row.
|
void |
setExprFilter(Expression filter) |
void |
setExprHaving(Expression having) |
void |
setQueryLanguage(String lang) |
void |
setResultDistinct() |
void |
setReturnsSingleRow() |
String |
toString() |
protected String queryLanguage
protected Class candidateClass
protected String candidateAlias
protected boolean returnsSingleRow
protected SymbolTable symtbl
protected boolean resultDistinct
protected Expression[] exprResult
protected Expression[] exprFrom
protected Expression[] exprUpdate
protected Expression exprFilter
protected Expression[] exprGrouping
protected Expression exprHaving
protected Expression[] exprOrdering
protected Map<String,QueryCompilation> subqueryCompilations
public QueryCompilation(Class candidateCls, String candidateAlias, SymbolTable symtbl, Expression[] results, Expression[] froms, Expression filter, Expression[] groupings, Expression having, Expression[] orderings, Expression[] updates)
public void setQueryLanguage(String lang)
public String getQueryLanguage()
public void setResultDistinct()
public boolean getResultDistinct()
public void setReturnsSingleRow()
public void addSubqueryCompilation(String alias, QueryCompilation compilation)
alias
- Alias for the subquery (variable name)compilation
- The compilationpublic QueryCompilation getCompilationForSubquery(String alias)
alias
- Alias of subquerypublic String[] getSubqueryAliases()
public boolean returnsSingleRow()
public Class[] getResultTypes()
public Class getCandidateClass()
public String getCandidateAlias()
public SymbolTable getSymbolTable()
public Expression[] getExprResult()
public Expression[] getExprFrom()
public Expression[] getExprUpdate()
public Expression getExprFilter()
public void setExprFilter(Expression filter)
public Expression[] getExprGrouping()
public Expression getExprHaving()
public void setExprHaving(Expression having)
public Expression[] getExprOrdering()
public ParameterExpression getParameterExpressionForPosition(int pos)
Copyright © 2019. All rights reserved.