case class QueryOptions(parameters: Option[QueryParameters] = None, clientContextId: Option[String] = None, maxParallelism: Option[Int] = None, metrics: Boolean = false, pipelineBatch: Option[Int] = None, pipelineCap: Option[Int] = None, profile: Option[QueryProfile] = None, readonly: Option[Boolean] = None, retryStrategy: Option[RetryStrategy] = None, scanCap: Option[Int] = None, scanConsistency: Option[QueryScanConsistency] = None, consistentWith: Option[Seq[MutationToken]] = None, timeout: Option[Duration] = None, adhoc: Boolean = true, deferredException: Option[RuntimeException] = None, parentSpan: Option[RequestSpan] = None, raw: Option[Map[String, Any]] = None, flexIndex: Boolean = false, preserveExpiry: Option[Boolean] = None, useReplica: Option[Boolean] = None) extends Product with Serializable
Customize the execution of a N1QL query.
- Since
1.0.0
- Alphabetic
- By Inheritance
- QueryOptions
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new QueryOptions(parameters: Option[QueryParameters] = None, clientContextId: Option[String] = None, maxParallelism: Option[Int] = None, metrics: Boolean = false, pipelineBatch: Option[Int] = None, pipelineCap: Option[Int] = None, profile: Option[QueryProfile] = None, readonly: Option[Boolean] = None, retryStrategy: Option[RetryStrategy] = None, scanCap: Option[Int] = None, scanConsistency: Option[QueryScanConsistency] = None, consistentWith: Option[Seq[MutationToken]] = None, timeout: Option[Duration] = None, adhoc: Boolean = true, deferredException: Option[RuntimeException] = None, parentSpan: Option[RequestSpan] = None, raw: Option[Map[String, Any]] = None, flexIndex: Boolean = false, preserveExpiry: Option[Boolean] = None, useReplica: Option[Boolean] = None)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def adhoc(adhoc: Boolean): QueryOptions
If true (the default), adhoc mode is enabled: queries are just run.
If true (the default), adhoc mode is enabled: queries are just run.
If false, adhoc mode is disabled and transparent prepared statement mode is enabled: queries are first prepared so they can be executed more efficiently in the future.
- returns
a copy of this with the change applied, for chaining.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clientContextId(contextId: String): QueryOptions
Adds a client context ID to the request, that will be sent back in the response, allowing clients to meaningfully trace requests/responses when many are exchanged.
Adds a client context ID to the request, that will be sent back in the response, allowing clients to meaningfully trace requests/responses when many are exchanged.
- returns
a copy of this with the change applied, for chaining.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def flexIndex(flexIndex: Boolean): QueryOptions
Tells the query engine to use a flex index (utilizing the search service).
Tells the query engine to use a flex index (utilizing the search service).
The default is false.
- returns
a copy of this with the change applied, for chaining.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def maxParallelism(maxParallelism: Int): QueryOptions
Allows to override the default maximum parallelism for the query execution on the server side.
Allows to override the default maximum parallelism for the query execution on the server side.
- maxParallelism
the maximum parallelism for this query, 0 or negative values disable it.
- returns
a copy of this with the change applied, for chaining.
- def metrics(metrics: Boolean): QueryOptions
Controls where metrics are returned by the server.
Controls where metrics are returned by the server.
- returns
a copy of this with the change applied, for chaining.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def parameters(values: QueryParameters): QueryOptions
Provides named or positional parameters, for queries parameterised that way.
Provides named or positional parameters, for queries parameterised that way.
See QueryParameters for details.
- returns
a copy of this with the change applied, for chaining.
- def parentSpan(value: RequestSpan): QueryOptions
Sets the parent
RequestSpan
.Sets the parent
RequestSpan
.- returns
a copy of this with the change applied, for chaining.
- def pipelineBatch(pipelineBatch: Int): QueryOptions
Advanced: Controls the number of items execution operators can batch for Fetch from the KV.
Advanced: Controls the number of items execution operators can batch for Fetch from the KV.
- pipelineBatch
the pipeline_batch param.
- returns
a copy of this with the change applied, for chaining.
- def pipelineCap(pipelineCap: Int): QueryOptions
Advanced: Maximum number of items each execution operator can buffer between various operators.
Advanced: Maximum number of items each execution operator can buffer between various operators.
- pipelineCap
the pipeline_cap param.
- returns
a copy of this with the change applied, for chaining.
- def preserveExpiry(preserveExpiry: Boolean): QueryOptions
Tells the query engine to preserve expiration values set on any documents modified by this query.
Tells the query engine to preserve expiration values set on any documents modified by this query.
The default is false.
This feature works from Couchbase Server 7.1.0 onwards.
- returns
a copy of this with the change applied, for chaining.
- Annotations
- @SinceCouchbase()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def profile(profile: QueryProfile): QueryOptions
Set the profiling information level for query execution
Set the profiling information level for query execution
This is an Enterprise Edition feature. On Community Edition the parameter will be accepted, but no profiling information returned.
- profile
the query profile level to be used
- returns
a copy of this with the change applied, for chaining.
- def raw(raw: Map[String, Any]): QueryOptions
Allows providing custom JSON key/value pairs for advanced usage.
Allows providing custom JSON key/value pairs for advanced usage.
If available, it is recommended to use the methods on this object to customize the query. This method should only be used if no such setter can be found (i.e. if an undocumented property should be set or you are using an older client and a new server-configuration property has been added to the cluster).
Note that the values will be passed through a JSON encoder, so do not provide already encoded JSON as the value. If you want to pass objects or arrays, you can use
JsonObject
andJsonArray
respectively.- returns
a copy of this with the change applied, for chaining.
- def readonly(readonly: Boolean): QueryOptions
If set to true, it will signal the query engine on the server that only non-data modifying requests are allowed.
If set to true, it will signal the query engine on the server that only non-data modifying requests are allowed. Note that this rule is enforced on the server and not the SDK side.
Controls whether a query can change a resulting record set.
If readonly is true, then the following statements are not allowed:
- CREATE INDEX
- DROP INDEX
- INSERT
- MERGE
- UPDATE
- UPSERT
- DELETE
- readonly
true if readonly should be forced, false is the default and will use the server side default.
- returns
a copy of this with the change applied, for chaining.
- def retryStrategy(strategy: RetryStrategy): QueryOptions
Sets what retry strategy to use if the operation fails.
Sets what retry strategy to use if the operation fails.
- strategy
the retry strategy to use
- returns
a copy of this with the change applied, for chaining.
- def scanCap(scanCap: Int): QueryOptions
Advanced: Maximum buffered channel size between the indexer client and the query service for index scans.
Advanced: 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.
- scanCap
the scan_cap param, use 0 or negative number to disable.
- returns
a copy of this with the change applied, for chaining.
- def scanConsistency(scanConsistency: QueryScanConsistency): QueryOptions
Scan consistency for the query
Scan consistency for the query
- scanConsistency
the index scan consistency to be used
- returns
a copy of this with the change applied, for chaining.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def timeout(timeout: Duration): QueryOptions
Sets a maximum timeout for processing.
Sets a maximum timeout for processing.
- timeout
the duration of the timeout.
- returns
a copy of this with the change applied, for chaining.
- def useReplica(useReplica: Boolean): QueryOptions
Tells the query engine that replicas can be used.
Tells the query engine that replicas can be used.
The default is not set
This feature works from Couchbase Server 7.6.0 onwards.
- returns
a copy of this with the change applied, for chaining.
- Annotations
- @SinceCouchbase()
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
- Deprecated