Class TransformationToSelect

java.lang.Object
com.sap.cds.util.transformations.TransformationToSelect

public class TransformationToSelect extends Object
Converts CqnTransformations to corresponding clauses of a CqnSelect statement. In SQL, the clauses of SELECT follow this "natural" order:
  1. FROM, JOIN
  2. WHERE
  3. GROUP BY
  4. aggregate functions
  5. HAVING
  6. window functions
  7. SELECT
  8. DISTINCT
  9. UNION/INTERSECT/EXCEPT
  10. ORDER BY
  11. SKIP/OFFSET
  12. TOP/LIMIT/FETCH
If the transformations follow this order, they are simply substituted by the corresponding clauses in `CqnSelect`. If a transformation breaks this order the statement is wrapped into a subquery and the transformation is applied to the subquery. Finally, the clauses of the original CqnSelect are converted to transformations and applied.
  • Constructor Details

    • TransformationToSelect

      public TransformationToSelect(Select<?> select)
  • Method Details

    • get

      public Select<?> get()
    • applyTransformations

      public void applyTransformations()
    • applyOrderAndLimit

      public void applyOrderAndLimit()