Click or drag to resize

QueryOptions Class

Options to control execution of a N1QL query.
Inheritance Hierarchy
SystemObject
  Couchbase.QueryQueryOptions

Namespace:  Couchbase.Query
Assembly:  Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 3.0.0-local-202004010202+047adc0837bfc29c0b8cce4322194a09afd8ea18
Syntax
C#
public class QueryOptions

The QueryOptions type exposes the following members.

Constructors
  NameDescription
Public methodQueryOptions
Creates a new QueryOptions object.
Public methodQueryOptions(String)
Creates a new QueryOptions object with a N1QL query statement.
Public methodQueryOptions(QueryPlan, String)
Creates a new QueryOptions object with an existing QueryPlan(QueryPlan).
Top
Properties
  NameDescription
Public propertyCurrentContextId
Gets the context identifier for the N1QL query request/response. Useful for debugging.
Public propertyIsAdHoc
Gets a value indicating whether this query statement is to executed in an ad-hoc manner.
Public propertyIsPrepared
Returns true if the request is a prepared statement
Public propertySerializer
Custom ITypeSerializer to use when deserializing query results.
Top
Methods
  NameDescription
Public methodAdHoc
If set to false, the client will try to perform optimizations transparently based on the server capabilities, like preparing the statement and then executing a query plan instead of the raw query.
Public methodCancellationToken
Set the CancellationToken(CancellationToken) which will cancel the query if it is incomplete.
Public methodClientContextId
Client Context ID. If no client context ID is provided on this option, a UUID is generated and sent automatically so by default it is always possible to identify a query when debugging.
Public methodConsistentWith
Provides a means of ensuring "read your own writes" or RYOW consistency on the current query.
Public methodStatic memberCreate
Creates a new QueryOptions object.
Public methodStatic memberCreate(String)
Creates a new QueryOptions object with the specified statement.
Public methodStatic memberCreate(QueryPlan, String)
Creates a query using the given plan as an optimization for the originalStatement.
Public methodGetFormValues
Gets a IDictionaryTKey, TValue of the name/value pairs to be POSTed to the service.
Public methodGetFormValuesAsJson
Gets the JSON representation of this query for execution in a POST.
Public methodMaxServerParallelism
Specifies the maximum parallelism for the query. A zero or negative value means the number of logical cpus will be used as the parallelism for the query. There is also a server wide max_parallelism parameter which defaults to 1. If a request includes max_parallelism, it will be capped by the server max_parallelism. If a request does not include max_parallelism, the server wide max_parallelism will be used.
Public methodMetrics
Specifies that metrics should be returned with query results.
Public methodParameter(KeyValuePairString, Object)
Adds a collection of named parameters to the parameters to the statement or prepared statement.
Public methodParameter(Object)
Adds a positional parameter to the parameters to the statement or prepared statement.
Public methodParameter(Object)
Adds a list of positional parameters to the statement or prepared statement.
Public methodParameter(String, Object)
Adds a named parameter to the parameters to the statement or prepared statement.
Public methodPipelineBatch
Sets the number of items execution operators can batch for fetch from the KV.
Public methodPipelineCap
Sets maximum number of items each execution operator can buffer between various operators.
Public methodPrepared
Sets a N1QL statement to be executed in an optimized way using the given queryPlan.
Public methodProfile
Set the QueryProfile information to be returned along with the query results.
Public methodRaw
Adds a raw query parameter and value to the query. NOTE: This is uncommitted and may change in the future.
Public methodReadOnly
If a GET request, this will always be true otherwise false.
Public methodScanCap
Sets maximum buffered channel size between the indexer client and the query service for index scans. This parameter controls when to use scan backfill. Use 0 or a negative number to disable.
Public methodScanConsistency
Specifies the consistency guarantee/constraint for index scanning.
Public methodScanWait
Specifies the maximum time the client is willing to wait for an index to catch up to the vector timestamp in the request. If an index has to catch up, and the ScanWait(TimeSpan) time is exceed doing so, an error is returned.
Public methodTimeout
Sets the maximum time to spend on the request.
Public methodToString
Returns a String that represents this instance.
(Overrides ObjectToString.)
Top
See Also