public class SelectUnion extends Query
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
EXCEPT
The type of an EXCEPT statement.
|
static int |
INTERSECT
The type of an INTERSECT statement.
|
static int |
UNION
The type of a UNION statement.
|
static int |
UNION_ALL
The type of a UNION ALL statement.
|
distinct, limitExpr, offsetExpr, randomAccessResult, sampleSizeExprcreate, parameters, prepareAlways, session, sqlStatement| 构造器和说明 |
|---|
SelectUnion(Session session,
Query query) |
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
int |
getColumnCount()
Get the column count of this query.
|
double |
getCost()
Calculate the cost to execute this query.
|
LocalResult |
getEmptyResult() |
ArrayList<Expression> |
getExpressions()
The the list of select expressions.
|
Query |
getLeft() |
String |
getPlanSQL()
Get the SQL statement with the execution plan.
|
Query |
getRight() |
HashSet<Table> |
getTables()
Get all tables that are involved in this query.
|
int |
getType()
Get the command type as defined in CommandInterface
|
int |
getUnionType() |
boolean |
hasOrder()
Whether the query has an order.
|
void |
init()
Initialize the query.
|
boolean |
isEverything(ExpressionVisitor visitor)
Check if this expression and all sub-expressions can fulfill a criteria.
|
boolean |
isReadOnly()
Check if this command is read only.
|
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.
|
LocalResult |
query(int limit,
ResultTarget target)
Execute the query, writing the result to the target result.
|
ResultInterface |
queryMeta()
Get an empty result set containing the meta data.
|
protected LocalResult |
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 |
setOrder(ArrayList<SelectOrderBy> order)
Set the order by list.
|
void |
setRight(Query select) |
void |
setSQL(String sql)
Set the SQL statement.
|
void |
setUnionType(int type) |
void |
updateAggregate(Session s)
Update all aggregate function values.
|
disableCache, getCostAsExpression, getLimit, getMaxDataModificationId, getOffset, getParameterValues, isDistinct, isQuery, isTransactional, prepareOrder, query, setDistinct, setLimit, setOffset, setRandomAccessResult, setSampleSizecheckCanceled, checkParameters, getCurrentObjectId, getCurrentRowNumber, getObjectId, getParameters, getSQL, getSQL, getSQL, isCacheable, needRecompile, setCommand, setCurrentRowNumber, setObjectId, setParameterList, setPrepareAlways, setRow, setSession, toString, updatepublic static final int UNION
public static final int UNION_ALL
public static final int EXCEPT
public static final int INTERSECT
public boolean isUnion()
Querypublic void prepareJoinBatch()
QueryprepareJoinBatch 在类中 Querypublic void setUnionType(int type)
public int getUnionType()
public void setRight(Query select)
public Query getLeft()
public Query getRight()
public void setOrder(ArrayList<SelectOrderBy> order)
Querypublic boolean hasOrder()
Querypublic ResultInterface queryMeta()
Preparedpublic LocalResult getEmptyResult()
protected LocalResult queryWithoutCache(int maxRows, ResultTarget target)
QueryqueryWithoutCache 在类中 QuerymaxRows - the limit as specified in the JDBC method calltarget - the target to write results topublic double getCost()
Querypublic HashSet<Table> getTables()
Querypublic ArrayList<Expression> getExpressions()
QuerygetExpressions 在类中 Querypublic void setForUpdate(boolean forUpdate)
QuerysetForUpdate 在类中 QueryforUpdate - the new settingpublic int getColumnCount()
QuerygetColumnCount 在类中 Querypublic void mapColumns(ColumnResolver resolver, int level)
QuerymapColumns 在类中 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 在类中 QuerytableFilter - the table filterb - the new valuepublic void addGlobalCondition(Parameter param, int columnId, int comparisonType)
QueryaddGlobalCondition 在类中 Queryparam - the parametercolumnId - the column index (0 meaning the first column)comparisonType - the comparison typepublic String getPlanSQL()
PreparedgetPlanSQL 在类中 Preparedpublic LocalResult query(int limit, ResultTarget target)
Querylimit - the maximum number of rows to returntarget - the target result (null will return the result)public boolean isEverything(ExpressionVisitor visitor)
QueryisEverything 在类中 Queryvisitor - the visitorpublic boolean isReadOnly()
PreparedisReadOnly 在类中 Preparedpublic void updateAggregate(Session s)
QueryupdateAggregate 在类中 Querys - the sessionpublic void fireBeforeSelectTriggers()
QueryfireBeforeSelectTriggers 在类中 Querypublic int getType()
Preparedpublic boolean allowGlobalConditions()
QueryallowGlobalConditions 在类中 QueryCopyright © 2017. All rights reserved.