Annotation Interface N1QL
Annotation used to define a dynamic N1QL query in
CouchbaseRepository.
This annotation allows repository methods to be mapped to Couchbase N1QL queries.
Parameters can be provided using the Param annotation.
Example Usage
@Repository
interface ProductRepository extends CouchbaseRepository<Product, String> {
@N1QL("SELECT * FROM products WHERE category = $category")
List<Product> findByCategory(@Param("category") String category);
}
-
Required Element Summary
Required Elements
-
Element Details
-
value
String valueThe N1QL query string to be executed.- Returns:
- the N1QL query
-