I've a spring-data couchbase repository. I'm trying to query the database using n1ql queries through the @Query annotation. A basic repository I implemented looks like this:
public interface CouchBaseRepository extends PagingAndSortingRepository<GsJsonStore, Long> {
@Query("SELECT * FROM default WHERE ?0 = ?1")
public Page<GsJsonStore> matchJson(String term, String value, Pageable pageable);�
}�
When I try to query using this method I get the error:
Unable to execute the query due to the following errors:
{"msg":"syntax error - at 0","code":3000}
Is there something I'm doing wrong?