Custom N1ql queries Using spring data JAVA

How do I run custom N1ql queries using spring-data. I am using spring boot with couchbase and I am able to run basic crud operation using crudrepository, but what if when we have dynamic n1ql queries, then what should I do.All I can find is that use @query anotation to run N1QL queries.Hope I made my question clear.

Check out the Spring Data Couchbase Reference Documentation. In particular, this section. I think what you’re looking for is in there, but let us know if you have further questions.

@ingenthr I did and was able to figure out, how to use template. Thanks again

1 Like