Class StringBasedN1qlQueryParser

java.lang.Object
org.springframework.data.couchbase.repository.query.StringBasedN1qlQueryParser

public class StringBasedN1qlQueryParser extends Object
Author:
Subhashni Balakrishnan, Michael Reiche
  • Field Details

    • SPEL_PREFIX

      public static final String SPEL_PREFIX
      See Also:
    • SPEL_SELECT_FROM_CLAUSE

      public static final String SPEL_SELECT_FROM_CLAUSE
      Use this variable in a SpEL expression in a @Query annotation's inline statement. This will be replaced by the correct SELECT x FROM y clause needed for entity mapping. Eg. "#{"#n1ql.selectEntity"} WHERE test = true". Note this only makes sense once, as the beginning of the statement.
      See Also:
    • SPEL_BUCKET

      public static final String SPEL_BUCKET
      Use this variable in a SpEL expression in a @Query annotation's inline statement. This will be replaced by the (escaped) bucket name corresponding to the repository's entity. Eg. "SELECT * FROM #{"#n1ql.bucket"} LIMIT 3".
      See Also:
    • SPEL_ENTITY

      public static final String SPEL_ENTITY
      Use this variable in a SpEL expression in a @Query annotation's inline statement. This will be replaced by the fields allowing to construct the repository's entity (SELECT clause). Eg. "SELECT #{"#n1ql.fields"} FROM test".
      See Also:
    • SPEL_FILTER

      public static final String SPEL_FILTER
      Use this variable in a SpEL expression in a @Query annotation's inline statement WHERE clause. This will be replaced by the expression allowing to only select documents matching the entity's class. Eg. "SELECT * FROM test WHERE test = true AND #{"#n1ql.filter"}".
      See Also:
    • SPEL_DELETE

      public static final String SPEL_DELETE
      Use this variable in a SpEL expression in a @Query annotation's inline statement. This will be replaced by the correct delete expression needed Eg. "#{"#n1ql.delete"} WHERE test = true". Note this only makes sense once, as the beginning of the statement.
      See Also:
    • SPEL_RETURNING

      public static final String SPEL_RETURNING
      Use this variable in a SpEL expression in a @Query annotation's inline statement. This will be replaced by the correct returning clause needed for entity mapping. Eg. "#{"#n1ql.returning"} WHERE test = true". Note this only makes sense once, as the beginning of the statement.
      See Also:
    • NAMED_PLACEHOLDER_PATTERN

      public static final Pattern NAMED_PLACEHOLDER_PATTERN
      regexp that detect $named placeholder (starts with a letter, then alphanum chars)
    • POSITIONAL_PLACEHOLDER_PATTERN

      public static final Pattern POSITIONAL_PLACEHOLDER_PATTERN
      regexp that detect positional placeholder ($ followed by digits only)
    • QUOTE_DETECTION_PATTERN

      public static final Pattern QUOTE_DETECTION_PATTERN
      regexp that detects " and ' quote boundaries, ignoring escaped quotes
    • parsedExpression

      public final N1QLExpression parsedExpression
  • Constructor Details

  • Method Details