Class CqnAnalyzer

java.lang.Object
com.sap.cds.ql.cqn.CqnAnalyzer

public final class CqnAnalyzer extends Object
  • Method Details

    • isCountQuery

      public static boolean isCountQuery(CqnStatement cqn)
      Returns true if the given CQN statement is a query with a single count item on the select list.
      Parameters:
      cqn - the CQN statement
      Returns:
      true if the given statement is a count query
    • create

      public static CqnAnalyzer create(CdsModel model)
      Creates an instance of CqnAnalyzer.
      Parameters:
      model - the CdsModel
      Returns:
      the CqnAnalyzer instance
    • create

      public static CqnAnalyzer create(Supplier<CdsModel> modelSupplier)
      Creates an instance of CqnAnalyzer.
      Parameters:
      modelSupplier - the CdsModel supplier
      Returns:
      the CqnAnalyzer instance
    • analyze

      public AnalysisResult analyze(CqnStructuredTypeRef ref)
      Analyzes the Segment(s) of the given CqnStructuredTypeRef.
      Parameters:
      ref - the CqnStructuredTypeRef to be analyzed
      Returns:
      the AnalysisResult with information on the segments of the CqnStructuredTypeRef
    • analyze

      public AnalysisResult analyze(CqnSelect select)
      Analyzes the ref and where condition of the given CqnSelect.
      Parameters:
      select - the CqnSelect statement to be analyzed
      Returns:
      the AnalysisResult with information on the ref Segment(s) and where condition of the select
    • analyze

      public AnalysisResult analyze(CqnUpdate update)
      Analyzes the ref and where condition of the given CqnUpdate. The update data is not considered.
      Parameters:
      update - the CqnUpdate statement to be analyzed
      Returns:
      the AnalysisResult with information on the ref Segment(s) and where condition of the update
    • analyze

      public AnalysisResult analyze(CqnDelete delete)
      Analyzes the ref and where condition of the given CqnDelete.
      Parameters:
      delete - the CqnDelete statement to be analyzed
      Returns:
      the AnalysisResult with information on the ref Segment(s) and where condition of the delete
    • resolveRefItems

      @Beta public Iterable<ResolvedRefItem> resolveRefItems(CqnSelect query)