Annotation Interface Query


Annotation to support the use of N1QL queries with Couchbase. Queries are crated by StringN1qlQueryCreator

Using it without parameter will resolve the query from the method name. Providing a value (an inline N1QL statement) will execute that statement instead.

In this case, one can use a placeholder notation of ?0, ?1 and so on.

Also, SpEL in the form #{spelExpression} is supported, including the following N1QL variables that will be replaced by the underlying CouchbaseTemplate associated information:

Author:
Simon Baslé.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Mark query as readonly
    Takes a N1QL statement string to define the actual query to be executed.
  • Element Details

    • value

      String value
      Takes a N1QL statement string to define the actual query to be executed. This one will take precedence over the method name.
      Default:
      ""
    • readonly

      boolean readonly
      Mark query as readonly
      See Also:
      • QueryOptions.readonly(boolean)
      Default:
      false