Skip to content

Automatically set QueryOptions readonly #1724

New issue

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? Sign in to your account

Closed
micopiira opened this issue Apr 27, 2023 · 1 comment · Fixed by #1730
Closed

Automatically set QueryOptions readonly #1724

micopiira opened this issue Apr 27, 2023 · 1 comment · Fixed by #1730
Labels
status: feedback-provided Feedback has been provided

Comments

@micopiira
Copy link
Contributor

When querying through (Reactive)CouchbaseTemplate, should query/count methods like all(), one(), count(), etc. automatically set the QueryOptions readonly to true?

In addition to providing some security in that you are not accidentally modifying data, setting this flag to true
also helps the client to more proactively retry and re-dispatch a query since then it can be sure it is idempotent.
As a result, if your query is readonly then it is a good idea to set this flag.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 27, 2023
@mikereiche
Copy link
Collaborator

They could. Submit a PR for it and I'll approve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: feedback-provided Feedback has been provided
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants