spring-projects / spring-projects/spring-data-couchbase

Fluent API needs a parametrized Query [DATACOUCH-551]

Open
#859 5 comments 0 reactions 1 assignee View on GitHub

@mikereiche is already working on this.

Since Dec 31, 2020.

type: enhancement
Dominant language
Java
Stars
284
Forks
197
PR merge metrics
No merged PRs in 30d

Description

deniswsrosa opened DATACOUCH-551 and commented

In the new API, if I have N1QL query in a String:

 

String myQueryStr = "Select * from mybucket"

 

There is no way to use it with the matching method as it expects an object of the type Query,  which uses the Query DSL.

 

couchbaseTemplate.findByQuery(User.class).matching(?).all();

Ideally, it should have some be similar to the following:

couchbaseTemplate.findByQuery(User.class).matching(N1QL.from(myQueryStr, params)).all();

 

Without this method, I suppose that a good portion of the clients using SPC3 will be forced to rewrite their queries to use the DSL, which will increase significantly the time necessary to migrate to SPC4.

 


Affects: 4.0 GA (Neumann)

1 votes, 2 watchers

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.