Packages

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

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. QueryOptions
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. 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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. 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.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. 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.

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. 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.

  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. 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.

  13. 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.

  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  17. 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.

  18. def parentSpan(value: RequestSpan): QueryOptions

    Sets the parent RequestSpan.

    Sets the parent RequestSpan.

    returns

    a copy of this with the change applied, for chaining.

  19. 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.

  20. 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.

  21. 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()
  22. def productElementNames: Iterator[String]
    Definition Classes
    Product
  23. 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.

  24. 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 and JsonArray respectively.

    returns

    a copy of this with the change applied, for chaining.

  25. 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.

  26. 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.

  27. 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.

  28. 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.

  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. 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.

  31. 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()
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped