|
auto | build () const -> built |
| Validates options and returns them as an immutable value.
|
|
auto | priority (bool prioritized) -> analytics_options & |
| Allows to give certain requests higher priority than others.
|
|
auto | readonly (bool readonly) -> analytics_options & |
| Allows explicitly marking a query as being readonly and not mutating and documents on the server side.
|
|
auto | scan_wait (std::chrono::milliseconds wait) -> analytics_options & |
| Allows customizing how long the query engine is willing to wait until the index catches up to whatever scan consistency is asked for in this query.
|
|
auto | client_context_id (std::string client_context_id) -> analytics_options & |
| Supports providing a custom client context ID for this query.
|
|
auto | scan_consistency (analytics_scan_consistency scan_consistency) -> analytics_options & |
| Customizes the consistency guarantees for this query.
|
|
auto | consistent_with (const mutation_state &state) -> analytics_options & |
| Sets the mutation_token s this query should be consistent with.
|
|
template<typename Serializer = codec::tao_json_serializer, typename Value, std::enable_if_t< codec::is_serializer_v< Serializer >, bool > = true> |
auto | raw (std::string name, const Value &value) -> analytics_options & |
|
template<typename Serializer = codec::tao_json_serializer, typename... Parameters, std::enable_if_t< codec::is_serializer_v< Serializer >, bool > = true> |
auto | positional_parameters (const Parameters &... parameters) -> analytics_options & |
| Set list of positional parameters for a query.
|
|
template<typename Serializer = codec::tao_json_serializer, typename... Parameters, std::enable_if_t< codec::is_serializer_v< Serializer >, bool > = true> |
auto | named_parameters (const Parameters &... parameters) -> analytics_options & |
| Set list of named parameters for a query.
|
|
template<typename Serializer = codec::tao_json_serializer, typename Parameter, std::enable_if_t< codec::is_serializer_v< Serializer >, bool > = true> |
auto | add_positional_parameter (const Parameter ¶meter) -> analytics_options & |
| Adds a positional parameter to the current list of positional parameters.
|
|
template<typename Serializer = codec::tao_json_serializer, typename Value, std::enable_if_t< codec::is_serializer_v< Serializer >, bool > = true> |
auto | add_named_parameter (const std::string &name, const Value &value) -> analytics_options & |
| Adds a named parameter to the current list of named parameters.
|
|
auto | clear_positional_parameters () -> analytics_options & |
| Clears the list of positional parameters.
|
|
auto | clear_named_parameters () -> analytics_options & |
| Clears the list of named parameters.
|
|
auto | encoded_raw_options (std::map< std::string, codec::binary, std::less<> > options) -> analytics_options & |
| Set map of raw options for a query.
|
|
auto | encoded_positional_parameters (std::vector< codec::binary > parameters) -> analytics_options & |
| Set list of positional parameters for a query.
|
|
auto | encoded_named_parameters (std::map< std::string, codec::binary, std::less<> > parameters) -> analytics_options & |
| Set map of named parameters for a query.
|
|
auto | timeout (const std::chrono::milliseconds timeout) -> analytics_options & |
| Specifies a custom per-operation timeout.
|
|
auto | retry_strategy (const std::shared_ptr< retry_strategy > strategy) -> analytics_options & |
| Specifies a custom couchbase::retry_strategy for this operation.
|
|
auto | parent_span (std::shared_ptr< tracing::request_span > span) -> analytics_options & |
|
Options for cluster::analytics_query() and scope::analytics_query().
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
Customizes the consistency guarantees for this query.
Tuning the scan consistency allows to trade data "freshness" for latency and vice versa. By default analytics_scan_consistency::not_bounded
is used, which means that the server returns the data it has in the index right away. This is fast, but might not include the most recent mutations. If you want to include all the mutations up to the point of the query, use analytics_scan_consistency::request_plus
.
Note that you cannot use this method and consistent_with(const mutation_state&)
at the same time, since they are mutually exclusive. As a rule of thumb, if you only care to be consistent with the mutation you just wrote on the same thread/app, use consistent_with(const mutation_state&)
. If you need "global" scan consistency, use analytics_scan_consistency::request_plus
on this method.
- Parameters
-
scan_consistency | the index scan consistency to be used for this query |
- Returns
- this options builder for chaining purposes.
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production