QueryOptions
in package
Table of Contents
- $adHoc : bool|null
- $clientContextId : string|null
- $consistentWith : MutationState|null
- $flexIndex : bool|null
- $maxParallelism : int|null
- $metrics : bool|null
- $namedParameters : array<string|int, mixed>|null
- $pipelineBatch : int|null
- $pipelineCap : int|null
- $positionalParameters : array<string|int, mixed>|null
- $preserveExpiry : bool|null
- $profile : string|null
- $queryContext : string|null
- $raw : array<string|int, mixed>|null
- $readonly : bool|null
- $scanCap : int|null
- $scanConsistency : string|null
- $scanWaitMilliseconds : int|null
- $timeoutMilliseconds : int|null
- $transcoder : Transcoder
- $useReplica : bool|null
- __construct() : mixed
- adhoc() : QueryOptions
- Sets whether this query is adhoc.
- build() : QueryOptions
- Static helper to keep code more readable
- clientContextId() : QueryOptions
- Sets the client context id for this query.
- consistentWith() : QueryOptions
- Sets the mutation state to achieve consistency with for read your own writes (RYOW).
- export() : array<string|int, mixed>
- flexIndex() : QueryOptions
- Sets whether this query allowed to use FlexIndex (full text search integration).
- getTranscoder() : Transcoder
- Returns associated transcoder.
- maxParallelism() : QueryOptions
- Sets the maximum number of index partitions, for computing aggregation in parallel.
- metrics() : QueryOptions
- Sets whether or not to return metrics with the query.
- namedParameters() : QueryOptions
- Sets the named parameters for this query.
- pipelineBatch() : QueryOptions
- Sets the number of items execution operators can batch for fetch from the KV service.
- pipelineCap() : QueryOptions
- Sets the maximum number of items each execution operator can buffer between various operators.
- positionalParameters() : QueryOptions
- Sets the positional parameters for this query.
- preserveExpiry() : QueryOptions
- Sets whether to tell the query engine to preserve expiration values set on any documents modified by this query.
- profile() : QueryOptions
- Sets the query profile mode to use.
- raw() : QueryOptions
- Sets any extra query parameters that the SDK does not provide an option for.
- readonly() : QueryOptions
- Sets whether this query is readonly.
- scanCap() : QueryOptions
- Sets the maximum buffered channel size between the indexer client and the query service for index scans.
- scanConsistency() : QueryOptions
- Sets the scan consistency.
- scanWait() : QueryOptions
- This is an advanced option, see the query service reference for more information on the proper use and tuning of this option.
- scopeName() : QueryOptions
- Associate scope name with query
- scopeQualifier() : QueryOptions
- Associate scope qualifier (also known as `query_context`) with the query.
- timeout() : QueryOptions
- Sets the operation timeout in milliseconds.
- transcoder() : QueryOptions
- Associate custom transcoder with the request.
- useReplica() : QueryOptions
- Sets whether the query engine should use replica nodes for KV fetches if the active node is down.
Properties
$adHoc
private
bool|null
$adHoc
= null
$clientContextId
private
string|null
$clientContextId
= null
$consistentWith
private
MutationState|null
$consistentWith
= null
$flexIndex
private
bool|null
$flexIndex
= null
$maxParallelism
private
int|null
$maxParallelism
= null
$metrics
private
bool|null
$metrics
= null
$namedParameters
private
array<string|int, mixed>|null
$namedParameters
= null
$pipelineBatch
private
int|null
$pipelineBatch
= null
$pipelineCap
private
int|null
$pipelineCap
= null
$positionalParameters
private
array<string|int, mixed>|null
$positionalParameters
= null
$preserveExpiry
private
bool|null
$preserveExpiry
= null
$profile
private
string|null
$profile
= null
$queryContext
private
string|null
$queryContext
= null
$raw
private
array<string|int, mixed>|null
$raw
= null
$readonly
private
bool|null
$readonly
= null
$scanCap
private
int|null
$scanCap
= null
$scanConsistency
private
string|null
$scanConsistency
= null
$scanWaitMilliseconds
private
int|null
$scanWaitMilliseconds
= null
$timeoutMilliseconds
private
int|null
$timeoutMilliseconds
= null
$transcoder
private
Transcoder
$transcoder
$useReplica
private
bool|null
$useReplica
= null
Methods
__construct()
public
__construct() : mixed
Tags
Return values
mixed —adhoc()
Sets whether this query is adhoc.
public
adhoc(bool $enabled) : QueryOptions
Parameters
- $enabled : bool
-
whether the query is adhoc
Tags
Return values
QueryOptions —build()
Static helper to keep code more readable
public
static build() : QueryOptions
Tags
Return values
QueryOptions —clientContextId()
Sets the client context id for this query.
public
clientContextId(string $id) : QueryOptions
Parameters
- $id : string
-
the client context id
Tags
Return values
QueryOptions —consistentWith()
Sets the mutation state to achieve consistency with for read your own writes (RYOW).
public
consistentWith(MutationState $state) : QueryOptions
Parameters
- $state : MutationState
-
the mutation state to achieve consistency with
Tags
Return values
QueryOptions —export()
public
static export(QueryOptions|null $options[, string $scopeName = null ][, string $bucketName = null ]) : array<string|int, mixed>
Parameters
- $options : QueryOptions|null
- $scopeName : string = null
- $bucketName : string = null
Return values
array<string|int, mixed> —flexIndex()
Sets whether this query allowed to use FlexIndex (full text search integration).
public
flexIndex(bool $enabled) : QueryOptions
Parameters
- $enabled : bool
-
whether the FlexIndex allowed
Tags
Return values
QueryOptions —getTranscoder()
Returns associated transcoder.
public
static getTranscoder(QueryOptions|null $options) : Transcoder
Parameters
- $options : QueryOptions|null
Tags
Return values
Transcoder —maxParallelism()
Sets the maximum number of index partitions, for computing aggregation in parallel.
public
maxParallelism(int $max) : QueryOptions
Parameters
- $max : int
-
the number of index partitions
Return values
QueryOptions —metrics()
Sets whether or not to return metrics with the query.
public
metrics(bool $enabled) : QueryOptions
Parameters
- $enabled : bool
-
whether to return metrics
Tags
Return values
QueryOptions —namedParameters()
Sets the named parameters for this query.
public
namedParameters(array<string|int, mixed> $pairs) : QueryOptions
Parameters
- $pairs : array<string|int, mixed>
-
the associative array of parameters
Tags
Return values
QueryOptions —pipelineBatch()
Sets the number of items execution operators can batch for fetch from the KV service.
public
pipelineBatch(int $batchSize) : QueryOptions
Parameters
- $batchSize : int
-
the pipeline batch size
Tags
Return values
QueryOptions —pipelineCap()
Sets the maximum number of items each execution operator can buffer between various operators.
public
pipelineCap(int $cap) : QueryOptions
Parameters
- $cap : int
-
the maximum number of items each execution operation can buffer
Tags
Return values
QueryOptions —positionalParameters()
Sets the positional parameters for this query.
public
positionalParameters(array<string|int, mixed> $params) : QueryOptions
Parameters
- $params : array<string|int, mixed>
-
the array of parameters
Tags
Return values
QueryOptions —preserveExpiry()
Sets whether to tell the query engine to preserve expiration values set on any documents modified by this query.
public
preserveExpiry(bool $preserve) : QueryOptions
Parameters
- $preserve : bool
-
whether to preserve expiration values.
Tags
Return values
QueryOptions —profile()
Sets the query profile mode to use.
public
profile(string|int $mode) : QueryOptions
Parameters
- $mode : string|int
-
the query profile mode
Tags
Return values
QueryOptions —raw()
Sets any extra query parameters that the SDK does not provide an option for.
public
raw(string $key, string $value) : QueryOptions
Parameters
- $key : string
-
the name of the parameter
- $value : string
-
the value of the parameter
Tags
Return values
QueryOptions —readonly()
Sets whether this query is readonly.
public
readonly(bool $readonly) : QueryOptions
Parameters
- $readonly : bool
-
whether the query is readonly
Tags
Return values
QueryOptions —scanCap()
Sets the maximum buffered channel size between the indexer client and the query service for index scans.
public
scanCap(int $cap) : QueryOptions
Parameters
- $cap : int
-
the maximum buffered channel size
Tags
Return values
QueryOptions —scanConsistency()
Sets the scan consistency.
public
scanConsistency(string|int $consistencyLevel) : QueryOptions
Parameters
- $consistencyLevel : string|int
-
the scan consistency level.
Tags
Return values
QueryOptions —scanWait()
This is an advanced option, see the query service reference for more information on the proper use and tuning of this option.
public
scanWait(int $milliseconds) : QueryOptions
Parameters
- $milliseconds : int
Tags
Return values
QueryOptions —scopeName()
Associate scope name with query
public
scopeName(string $name) : QueryOptions
Parameters
- $name : string
-
the name of the scope
Tags
Return values
QueryOptions —scopeQualifier()
Associate scope qualifier (also known as `query_context`) with the query.
public
scopeQualifier(string $qualifier) : QueryOptions
The qualifier must be in form ${bucketName}.${scopeName}
or default:${bucketName}.${scopeName}
Parameters
- $qualifier : string
-
the scope qualifier
Tags
Return values
QueryOptions —timeout()
Sets the operation timeout in milliseconds.
public
timeout(int $milliseconds) : QueryOptions
Parameters
- $milliseconds : int
-
the operation timeout to apply
Tags
Return values
QueryOptions —transcoder()
Associate custom transcoder with the request.
public
transcoder(Transcoder $transcoder) : QueryOptions
Parameters
- $transcoder : Transcoder
Tags
Return values
QueryOptions —useReplica()
Sets whether the query engine should use replica nodes for KV fetches if the active node is down.
public
useReplica(bool $useReplica) : QueryOptions
Parameters
- $useReplica : bool
-
Whether to use replica nodes for KV fetches