How to escape N1QL using the Java API


I’m new to Couchbase and am doing a bit of prototyping.

When creating a query does the Java API automatically escape Expressions ?

I’ve tried using the Expression class and it not does appear to do so.

Am I missing something.

Thank you.


Just to add a few extra references, I would recomend using spring data if you can use spring.

You can also check the Java Travel sample to understand how to structure your code.