public class SelectUnion extends Query
| Modifier and Type | Class and Description |
|---|---|
static class |
SelectUnion.UnionType |
create, parameters, prepareAlways, session, sqlStatement| Constructor and Description |
|---|
SelectUnion(Session session,
SelectUnion.UnionType unionType,
Query query,
Query right) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGlobalCondition(Parameter param,
int columnId,
int comparisonType)
Add a condition to the query.
|
boolean |
allowGlobalConditions()
Check whether adding condition to the query is allowed.
|
void |
fireBeforeSelectTriggers()
Call the before triggers on all tables.
|
double |
getCost()
Calculate the cost to execute this query.
|
LocalResult |
getEmptyResult() |
Query |
getLeft() |
java.lang.String |
getPlanSQL(boolean alwaysQuote)
Get the SQL statement with the execution plan.
|
Query |
getRight() |
java.util.HashSet<Table> |
getTables()
Get all tables that are involved in this query.
|
SelectUnion.UnionType |
getUnionType() |
void |
init()
Initialize the query.
|
boolean |
isEverything(ExpressionVisitor visitor)
Check if this expression and all sub-expressions can fulfill a criteria.
|
boolean |
isUnion()
Check if this is a UNION query.
|
void |
mapColumns(ColumnResolver resolver,
int level)
Map the columns to the given column resolver.
|
void |
prepare()
Prepare this statement.
|
void |
prepareJoinBatch()
Prepare join batching.
|
protected ResultInterface |
queryWithoutCache(int maxRows,
ResultTarget target)
Execute the query without checking the cache.
|
void |
setEvaluatable(TableFilter tableFilter,
boolean b)
Change the evaluatable flag.
|
void |
setForUpdate(boolean forUpdate)
Set the 'for update' flag.
|
void |
updateAggregate(Session s,
int stage)
Update all aggregate function values.
|
collectDependencies, disableCache, getColumnCount, getCostAsExpression, getExpressions, getLimit, getMaxDataModificationId, getOffset, getType, hasOrder, isAnyDistinct, isFetchPercent, isNeverLazy, isQuery, isRandomAccessResult, isReadOnly, isStandardDistinct, isTransactional, isWithTies, prepareOrder, query, query, queryMeta, setDistinctIfPossible, setFetchPercent, setLimit, setNeverLazy, setOffset, setOrder, setRandomAccessResult, setSampleSize, setWithTies, toTablecheckCanceled, checkParameters, getCteCleanups, getCurrentRowNumber, getObjectId, getParameters, getPersistedObjectId, getSession, getSimpleSQL, getSQL, getSQL, isCacheable, needRecompile, setCommand, setCteCleanups, setCurrentRowNumber, setParameterList, setPersistedObjectId, setPrepareAlways, setRow, setSession, setSQL, toString, updatepublic SelectUnion(Session session, SelectUnion.UnionType unionType, Query query, Query right)
public boolean isUnion()
Querypublic void prepareJoinBatch()
QueryprepareJoinBatch in class Querypublic SelectUnion.UnionType getUnionType()
public Query getLeft()
public Query getRight()
public LocalResult getEmptyResult()
protected ResultInterface queryWithoutCache(int maxRows, ResultTarget target)
QueryqueryWithoutCache in class QuerymaxRows - the limit as specified in the JDBC method calltarget - the target to write results topublic void init()
Querypublic void prepare()
Preparedpublic double getCost()
Querypublic java.util.HashSet<Table> getTables()
Querypublic void setForUpdate(boolean forUpdate)
QuerysetForUpdate in class QueryforUpdate - the new settingpublic void mapColumns(ColumnResolver resolver, int level)
QuerymapColumns in class Queryresolver - the resolverlevel - the subquery level (0 is the top level query, 1 is the first
subquery level)public void setEvaluatable(TableFilter tableFilter, boolean b)
QuerysetEvaluatable in class QuerytableFilter - the table filterb - the new valuepublic void addGlobalCondition(Parameter param, int columnId, int comparisonType)
QueryaddGlobalCondition in class Queryparam - the parametercolumnId - the column index (0 meaning the first column)comparisonType - the comparison typepublic java.lang.String getPlanSQL(boolean alwaysQuote)
PreparedgetPlanSQL in class PreparedalwaysQuote - quote all identifierspublic boolean isEverything(ExpressionVisitor visitor)
QueryisEverything in class Queryvisitor - the visitorpublic void updateAggregate(Session s, int stage)
QueryupdateAggregate in class Querys - the sessionstage - select stagepublic void fireBeforeSelectTriggers()
QueryfireBeforeSelectTriggers in class Querypublic boolean allowGlobalConditions()
QueryallowGlobalConditions in class Query