Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
to your account
Michael Reiche opened DATACOUCH-532 and commented
queries use literals instead of parameters, preventing the re-use of query plans
For example, for findByLastname("Robertson"), the following query is generated :
SELECT meta().id as __id, meta().cas as __cas, travel-sample.* FROM travel-sample WHERE lastname = "Robertson" AND _class = "org.springframework.data.couchbase.domain.Person"
It would be more efficient to parameterized "Robertson" , so the query plan can be reused:
SELECT meta().id as __id, meta().cas as __cas, travel-sample.* FROM travel-sample WHERE lastname = $1 AND _class = "org.springframework.data.couchbase.domain.Person"
It is not so important to parameterize the 'type', as this query will always be on the same type
Referenced from: pull request #239
Backported to: 4.0.2 (Neumann SR2)
The text was updated successfully, but these errors were encountered:
Michael Reiche commented
There is a related issue when handling. String-n1ql queries. The parameters in the query string need to be bound to the parameters
Sorry, something went wrong.
No branches or pull requests