public class Query extends QueryCommand implements FilteredCommand
CLAUSE PURPOSE
========= ==============================================
Select Defines the variables data to be retrieved for
From Defines the groups to retrieve data from
Criteria Defines constraints on data retrieval ("where")
GroupBy Defines how rows being returned should be grouped
Having Defines how groups should be filtered, also a criteria
OrderBy Defines how the results should be sorted
Option Defines any extra options on the query
LanguageObject.UtiltempGroupIDs, TYPE_ALTER_PROC, TYPE_ALTER_TRIGGER, TYPE_ALTER_VIEW, TYPE_BATCHED_UPDATE, TYPE_CREATE, TYPE_DELETE, TYPE_DROP, TYPE_DYNAMIC, TYPE_EXPLAIN, TYPE_INSERT, TYPE_QUERY, TYPE_SOURCE_EVENT, TYPE_STORED_PROCEDURE, TYPE_TRIGGER_ACTION, TYPE_UNKNOWN, TYPE_UPDATE, TYPE_UPDATE_PROCEDURE| Constructor and Description |
|---|
Query()
Constructs a default instance of this class.
|
Query(Select select,
From from,
Criteria criteria,
GroupBy groupBy,
Criteria having,
OrderBy orderBy,
Option option)
Constructs an instance of this class given all the clauses
|
Query(Select select,
From from,
Criteria criteria,
OrderBy orderBy,
Option option)
Constructs an instance of this class given the specified clauses
|
| Modifier and Type | Method and Description |
|---|---|
void |
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.
|
static boolean |
areColumnsCachable(Collection<? extends Expression> projectedSymbols) |
boolean |
areResultsCachable()
Whether the results are cachable.
|
void |
clearCriteria()
Set the criteria clause to null
|
Object |
clone()
Deep clone Query to produce a new identical query.
|
boolean |
equals(Object obj)
Compare two queries for equality.
|
Criteria |
getCriteria()
Get the criteria clause for the query.
|
From |
getFrom()
Get the from clause for the query.
|
GroupBy |
getGroupBy()
Get the group by clause for the query.
|
Criteria |
getHaving()
Get the having clause for the query.
|
Into |
getInto() |
Query |
getProjectedQuery() |
List<Expression> |
getProjectedSymbols()
Get the ordered list of all elements returned by this query.
|
Select |
getSelect()
Get the select clause for the query.
|
int |
getType()
Return type of command.
|
boolean |
hasAggregates() |
int |
hashCode()
Get hashcode for query.
|
boolean |
isRowConstructor() |
boolean |
returnsResultSet() |
static Query |
rowConstructor(List<Expression> select) |
void |
setCriteria(Criteria criteria)
Set the criteria clause for the query.
|
void |
setFrom(From from)
Set the from clause for the query.
|
void |
setGroupBy(GroupBy groupBy)
Set the group by clause for the query.
|
void |
setHaving(Criteria having)
Set the criteria clause for the query.
|
void |
setInto(Into into) |
void |
setRowConstructor(boolean isRowConstructor) |
void |
setSelect(Select select)
Set the select clause for the query.
|
getLimit, getOrderBy, getWith, setLimit, setOrderBy, setWithaddExternalGroupToContext, copyMetadataState, getActualCommand, getAllExternalGroups, getCacheHint, getCommandToken, getCorrelatedReferences, getExternalGroupContexts, getOption, getProcessorPlan, getResultSetColumns, getSourceHint, getTemporaryMetadata, getUpdateCommandSymbol, printCommandTree, printCommandTree, pushNewResolvingContext, sameOptionAndHint, setCacheHint, setCorrelatedReferences, setExternalGroupContexts, setOption, setProcessorPlan, setSourceHint, setTemporaryMetadata, toStringpublic Query()
public Query(Select select, From from, Criteria criteria, OrderBy orderBy, Option option)
select - SELECT clausefrom - FROM clausecriteria - WHERE clauseorderBy - ORDER BY clauseoption - OPTION clausepublic Query(Select select, From from, Criteria criteria, GroupBy groupBy, Criteria having, OrderBy orderBy, Option option)
select - SELECT clausefrom - FROM clausecriteria - WHERE clausegroupBy - GROUP BY clausehaving - HAVING clauseorderBy - ORDER BY clauseoption - OPTION clausepublic static Query rowConstructor(List<Expression> select)
public int getType()
public Select getSelect()
public void setSelect(Select select)
select - SELECT clausepublic From getFrom()
public void setFrom(From from)
from - FROM clausepublic Criteria getCriteria()
getCriteria in interface FilteredCommandpublic void setCriteria(Criteria criteria)
setCriteria in interface FilteredCommandcriteria - WHERE clausepublic void clearCriteria()
public GroupBy getGroupBy()
public void setGroupBy(GroupBy groupBy)
groupBy - GROUP BY clausepublic Criteria getHaving()
public void setHaving(Criteria having)
having - HAVING clausepublic Into getInto()
public void setInto(Into into)
into - public void acceptVisitor(LanguageVisitor visitor)
LanguageObjectacceptVisitor in interface LanguageObjectvisitor - Visitor being usedpublic List<Expression> getProjectedSymbols()
getProjectedSymbols in class Commandpublic Object clone()
clone in interface LanguageObjectclone in class Commandpublic boolean equals(Object obj)
public int hashCode()
public boolean areResultsCachable()
CommandareResultsCachable in class CommandCommand.areResultsCachable()public static boolean areColumnsCachable(Collection<? extends Expression> projectedSymbols)
public Query getProjectedQuery()
getProjectedQuery in class QueryCommandQueryCommand.getProjectedQuery()public boolean returnsResultSet()
returnsResultSet in class QueryCommandpublic boolean hasAggregates()
public boolean isRowConstructor()
public void setRowConstructor(boolean isRowConstructor)
Copyright © 2020. All rights reserved.