Package com.sap.cds.ql.cqn
Interface CqnSelect
- All Superinterfaces:
CqnEntitySelector
,CqnFilterableStatement
,CqnSource
,CqnStatement
,CqnToken
,JSONizable
- All Known Implementing Classes:
Select
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
accept
(CqnVisitor visitor) Traverses the clauses of thisCqnSelect
with a givenvisitor
.default CqnSelect
asSelect()
Casts this CQN statement toCqnSelect
.default List<CqnSelectListItem>
columns()
Deprecated.default void
dispatch
(CqnVisitor visitor) Dispatches a given visitor to all clause except the ref or source of this entity selectorfrom()
The from clause of this select statement.getLock()
groupBy()
having()
boolean
default boolean
isSelect()
Returnstrue
if this is aCqnSelect
statement.search()
Returns the pipeline of transformations, which is applied to the source ref of this select statement before the the regular clauses are applied.Methods inherited from interface com.sap.cds.ql.cqn.CqnEntitySelector
hasInlineCount, hasLimit, items, orderBy, ref, skip, top
Methods inherited from interface com.sap.cds.ql.cqn.CqnFilterableStatement
where
Methods inherited from interface com.sap.cds.ql.cqn.CqnSource
asJoin, asRef, asTableFunction, isJoin, isRef, isTableFunction
Methods inherited from interface com.sap.cds.ql.cqn.CqnStatement
asDelete, asInsert, asUpdate, asUpsert, hints, isDelete, isInsert, isUpdate, isUpsert, ref
Methods inherited from interface com.sap.cds.JSONizable
toJson
-
Method Details
-
from
CqnSource from()The from clause of this select statement.- Returns:
- a reference to this statement's
CqnSource
-
isDistinct
boolean isDistinct()- Returns:
- whether statement is a SELECT DISTINCT
-
columns
Deprecated.instead useCqnEntitySelector.items()
- Returns:
- the select list items
-
groupBy
-
excluding
-
having
Optional<CqnPredicate> having() -
getLock
-
search
Optional<CqnPredicate> search() -
transformations
Returns the pipeline of transformations, which is applied to the source ref of this select statement before the the regular clauses are applied. The statement is processed in this order:- ref, source
- transformations
- where, search
- groupBy
- having
- items, distinct
- orderBy
- skip
- top
- Returns:
- the pipeline of transformations
-
isSelect
default boolean isSelect()Description copied from interface:CqnStatement
Returnstrue
if this is aCqnSelect
statement.- Specified by:
isSelect
in interfaceCqnSource
- Specified by:
isSelect
in interfaceCqnStatement
- Returns:
true
if this is a select statement, otherwisefalse
-
asSelect
Description copied from interface:CqnStatement
Casts this CQN statement toCqnSelect
.- Specified by:
asSelect
in interfaceCqnSource
- Specified by:
asSelect
in interfaceCqnStatement
- Returns:
- this statement as a CqnSelect
-
accept
Traverses the clauses of thisCqnSelect
with a givenvisitor
. If the source of this select is a structured type reference it is visited first. The other clauses are traversed depth-first in the following order:- items
- where
- search
- group by
- having
- order by
CqnSelect
is passed to theCqnVisitor.visit(CqnSelect)
method.- Specified by:
accept
in interfaceCqnToken
- Parameters:
visitor
- theCqnVisitor
-
dispatch
Description copied from interface:CqnEntitySelector
Dispatches a given visitor to all clause except the ref or source of this entity selector- Specified by:
dispatch
in interfaceCqnEntitySelector
- Parameters:
visitor
- the visitor
-
CqnEntitySelector.items()