Package com.sap.cds.ql.cqn
Interface CqnSelect
-
- All Superinterfaces:
CqnEntitySelector
,CqnSource
,CqnStatement
,CqnToken
,JSONizable
- All Known Implementing Classes:
Select
public interface CqnSelect extends CqnStatement, CqnEntitySelector, CqnToken, CqnSource
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default 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.instead useCqnEntitySelector.items()
default void
dispatch(CqnVisitor visitor)
Dispatches a given visitor to all clause except the ref or source of this entity selectorList<String>
excluding()
CqnSource
from()
The from clause of this select statement.Optional<CqnLock>
getLock()
List<CqnValue>
groupBy()
boolean
hasInlineCount()
Optional<CqnPredicate>
having()
boolean
isDistinct()
default boolean
isSelect()
Returnstrue
if this is aCqnSelect
statement.Optional<CqnPredicate>
search()
Optional<CqnPredicate>
where()
-
Methods inherited from interface com.sap.cds.ql.cqn.CqnEntitySelector
hasLimit, items, limit, orderBy, ref, skip, top
-
Methods inherited from interface com.sap.cds.ql.cqn.CqnSource
asJoin, asQuery, asRef, isJoin, isQuery, isRef
-
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 Detail
-
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
-
hasInlineCount
boolean hasInlineCount()
- Returns:
- whether the statement returns an inline count
-
columns
@Deprecated default List<CqnSelectListItem> columns()
Deprecated.instead useCqnEntitySelector.items()
- Returns:
- the select list items
-
where
Optional<CqnPredicate> where()
-
having
Optional<CqnPredicate> having()
-
search
Optional<CqnPredicate> search()
-
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
default CqnSelect 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
default void accept(CqnVisitor visitor)
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
default void dispatch(CqnVisitor visitor)
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
-
-