Package org.teiid.language
Class Select
- java.lang.Object
-
- org.teiid.language.BaseLanguageObject
-
- org.teiid.language.QueryExpression
-
- org.teiid.language.Select
-
- All Implemented Interfaces:
Command
,InsertValueSource
,LanguageObject
public class Select extends QueryExpression
Represents a simple SELECT query.
-
-
Constructor Summary
Constructors Constructor Description Select()
Constructs an empty select.Select(List<DerivedColumn> derivedColumns, boolean distinct, List<TableReference> from, Condition where, GroupBy groupBy, Condition having, OrderBy orderBy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptVisitor(LanguageObjectVisitor visitor)
Map<String,List<? extends List<?>>>
getDependentValues()
Gets the dependent value lists.List<DerivedColumn>
getDerivedColumns()
List<TableReference>
getFrom()
Get FROM clause, should never be null.GroupBy
getGroupBy()
Get GROUP BY clause, may be null.Condition
getHaving()
Get HAVING clause, may be null.Select
getProjectedQuery()
Condition
getWhere()
Get WHERE clause, may be null.boolean
isDistinct()
void
setDependentValues(Map<String,List<? extends List<?>>> dependentValues)
void
setDerivedColumns(List<DerivedColumn> symbols)
void
setDistinct(boolean distinct)
void
setFrom(List<TableReference> from)
Set FROM clause, should never be null.void
setGroupBy(GroupBy groupBy)
Set GROUP BY clause, may be null.void
setHaving(Condition criteria)
Set HAVING clause, may be null.void
setWhere(Condition criteria)
Set WHERE clause, may be null.-
Methods inherited from class org.teiid.language.QueryExpression
getColumnNames, getColumnTypes, getLimit, getOrderBy, getWith, setLimit, setOrderBy, setWith
-
Methods inherited from class org.teiid.language.BaseLanguageObject
toString
-
-
-
-
Constructor Detail
-
Select
public Select()
Constructs an empty select. This is not valid until at least theDerivedColumn
s have been set.
-
Select
public Select(List<DerivedColumn> derivedColumns, boolean distinct, List<TableReference> from, Condition where, GroupBy groupBy, Condition having, OrderBy orderBy)
-
-
Method Detail
-
getDerivedColumns
public List<DerivedColumn> getDerivedColumns()
-
isDistinct
public boolean isDistinct()
-
setDerivedColumns
public void setDerivedColumns(List<DerivedColumn> symbols)
-
setDistinct
public void setDistinct(boolean distinct)
-
getFrom
public List<TableReference> getFrom()
Get FROM clause, should never be null.- Returns:
- From clause object
-
getWhere
public Condition getWhere()
Get WHERE clause, may be null.- Returns:
- A criteria object
-
getGroupBy
public GroupBy getGroupBy()
Get GROUP BY clause, may be null.- Returns:
- A group by object
-
getHaving
public Condition getHaving()
Get HAVING clause, may be null.- Returns:
- A criteria object
-
acceptVisitor
public void acceptVisitor(LanguageObjectVisitor visitor)
-
setFrom
public void setFrom(List<TableReference> from)
Set FROM clause, should never be null.- Parameters:
from
- From clause object
-
setWhere
public void setWhere(Condition criteria)
Set WHERE clause, may be null.- Parameters:
criteria
- A criteria object
-
setGroupBy
public void setGroupBy(GroupBy groupBy)
Set GROUP BY clause, may be null.- Parameters:
groupBy
- A group by object
-
setHaving
public void setHaving(Condition criteria)
Set HAVING clause, may be null.- Parameters:
criteria
- A criteria object
-
getProjectedQuery
public Select getProjectedQuery()
- Specified by:
getProjectedQuery
in classQueryExpression
-
getDependentValues
public Map<String,List<? extends List<?>>> getDependentValues()
Gets the dependent value lists. The lists are memory-safe. Caution should be used to not access large lists in a non-memory safe manner. The lists are invalid after returning results from the pushdown query.- Returns:
- the map of dependent values or null if this is not a dependent join pushdown
-
-