Package com.sap.cds.ql.hana
Interface Hierarchy
- All Superinterfaces:
CqnHierarchy
,CqnSource
,CqnTableFunction
,CqnToken
,JSONizable
,Source<StructuredType<?>>
,TableFunction
A SAP HANA hierarchy generator function that generates a hierarchy based on recursive
parent-child source data.
The function adds the following elements to the result:
element name | type | description |
---|---|---|
hierarchy_rank | Int64 | The preorder rank of the node in the tree representation of the result set |
hierarchy_level | Int32 | The level to which the node belongs |
hierarchy_tree_size | Int64 | The number of descendant nodes +1 |
-
Method Summary
Modifier and TypeMethodDescriptionCreates a copy of this hierarchy generator function with the given source.Specifies the maximum search depth during hierarchy generation.orderBy
(CqnSortSpecification... siblingOrderBy) Specifies the sort order of sibling nodes.Specifies the sort order of sibling nodes given as element names of the source of this hierarchy.orderBy
(List<CqnSortSpecification> siblingOrderBy) Specifies the sort order of sibling nodes.startWhere
(CqnPredicate startWhere) Specifies a filter condition that identifies the root nodes of the hierarchy generated by this generator.Methods inherited from interface com.sap.cds.ql.hana.CqnHierarchy
asGenerator, asHierarchySubset, asTableFunction, isGenerator, isHierarchySubset, isTableFunction
Methods inherited from interface com.sap.cds.ql.cqn.CqnSource
asJoin, asRef, asSelect, isJoin, isRef, isSelect
Methods inherited from interface com.sap.cds.CqnTableFunction
name, rowType, source
Methods inherited from interface com.sap.cds.JSONizable
toJson
-
Method Details
-
copy
Creates a copy of this hierarchy generator function with the given source.- Specified by:
copy
in interfaceTableFunction
- Parameters:
source
- the hierarchy source- Returns:
- new hierarchy generator function with the given source
-
startWhere
Specifies a filter condition that identifies the root nodes of the hierarchy generated by this generator. If no filter is specified the root nodes are identified by the condition `parent_id = NULL`.- Parameters:
startWhere
- the filter condition- Returns:
- this hierarchy generator function
-
orderBy
Specifies the sort order of sibling nodes. This overrides any sort order the source might originally have.- Parameters:
siblingOrderBy
- the sort specifications- Returns:
- this hierarchy generator function
-
orderBy
Specifies the sort order of sibling nodes. This overrides any sort order the source might originally have.- Parameters:
siblingOrderBy
- the sort specifications- Returns:
- this hierarchy generator function
-
orderBy
Specifies the sort order of sibling nodes given as element names of the source of this hierarchy. This overrides any sort order the source might originally have.- Parameters:
siblingOrderBy
- the element names- Returns:
- this hierarchy generator function
-
depth
Specifies the maximum search depth during hierarchy generation.- Parameters:
depth
- the maximum depth- Returns:
- this hierarchy generator function
-