Skip to content

Automatically set QueryOptions readonly #1724

Closed
@micopiira

Description

@micopiira

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions