Documentation

ViewOptions
in package

Table of Contents

$debug  : bool|null
$endKey  : mixed
$endKeyDocId  : string|null
$group  : bool|null
$groupLevel  : int|null
$inclusiveEnd  : bool|null
$key  : mixed
$keys  : array<string|int, mixed>|null
$limit  : int|null
$namespace  : int|null
$onError  : int|null
$order  : string|null
$raw  : array<string|int, mixed>|null
$reduce  : bool|null
$scanConsistency  : string|null
$skip  : int|null
$startKey  : mixed
$startKeyDocId  : string|null
$timeoutMilliseconds  : int|null
build()  : ViewOptions
Static helper to keep code more readable
debug()  : ViewOptions
Sets whether to return debug information as part of the view response.
endKey()  : ViewOptions
Sets the key to stop returning results at.
endKeyDocId()  : ViewOptions
Sets the document id to stop returning results at within a number of results should endKey have multiple entries within the index.
export()  : array<string|int, mixed>
group()  : ViewOptions
Whether to enable grouping of results.
groupLevel()  : ViewOptions
Sets the depth within the key to group results.
idRange()  : ViewOptions
Sets the range of keys to skip to before beginning to return results and to stop returning results at.
inclusiveEnd()  : ViewOptions
Sets whether the endKey/endKeyDocId values should be inclusive or exclusive.
key()  : ViewOptions
Sets the specific key to fetch from the index.
keys()  : ViewOptions
Sets the specific set of keys to fetch from the index.
limit()  : ViewOptions
Sets the number of documents to limit the result to.
namespace()  : ViewOptions
Sets whether the SDK should prefix the design document name with a "dev_" prefix.
order()  : ViewOptions
Sets the order of the results.
range()  : ViewOptions
Sets the range of keys to skip to before beginning to return results and to stop returning results at.
reduce()  : ViewOptions
Whether to run the reduce function associated with the view index.
scanConsistency()  : ViewOptions
Sets the scan consistency.
skip()  : ViewOptions
Sets the number of documents to skip for the query.
startKey()  : ViewOptions
Sets the key to skip to before beginning to return results.
startKeyDocId()  : ViewOptions
Sets the document id to start returning results at within a number of results should startKey have multiple entries within the index.
timeout()  : ViewOptions
Sets the operation timeout in milliseconds.

Properties

$endKeyDocId

private string|null $endKeyDocId = null

$inclusiveEnd

private bool|null $inclusiveEnd = null

$keys

private array<string|int, mixed>|null $keys = null

$raw

private array<string|int, mixed>|null $raw = null

$scanConsistency

private string|null $scanConsistency = null

$startKeyDocId

private string|null $startKeyDocId = null

$timeoutMilliseconds

private int|null $timeoutMilliseconds = null

Methods

debug()

Sets whether to return debug information as part of the view response.

public debug(bool $enabled) : ViewOptions
Parameters
$enabled : bool

whether to return debug information as part of the view response.

Tags
since
4.0.0
Return values
ViewOptions

endKey()

Sets the key to stop returning results at.

public endKey(mixed $key) : ViewOptions
Parameters
$key : mixed

the key to stop returning results at.

Tags
since
4.0.0
Return values
ViewOptions

endKeyDocId()

Sets the document id to stop returning results at within a number of results should endKey have multiple entries within the index.

public endKeyDocId(string $key) : ViewOptions
Parameters
$key : string

the key to use.

Tags
since
4.0.0
Return values
ViewOptions

export()

public static export(ViewOptions|null $options) : array<string|int, mixed>
Parameters
$options : ViewOptions|null
Return values
array<string|int, mixed>

group()

Whether to enable grouping of results.

public group(bool $enabled) : ViewOptions
Parameters
$enabled : bool

whether to enable grouping of results.

Tags
since
4.0.0
Return values
ViewOptions

groupLevel()

Sets the depth within the key to group results.

public groupLevel(int $depth) : ViewOptions
Parameters
$depth : int

the depth within the key to group results.

Tags
since
4.0.0
Return values
ViewOptions

idRange()

Sets the range of keys to skip to before beginning to return results and to stop returning results at.

public idRange(mixed $start, mixed $end[, bool $inclusiveEnd = false ]) : ViewOptions
Parameters
$start : mixed

the doc id to skip to before beginning to return results.

$end : mixed

the doc id to stop returning results at.

$inclusiveEnd : bool = false

whether the endKey values should be inclusive or exclusive.

Tags
deprecated
since
4.0.0
Return values
ViewOptions

inclusiveEnd()

Sets whether the endKey/endKeyDocId values should be inclusive or exclusive.

public inclusiveEnd(bool $enabled) : ViewOptions
Parameters
$enabled : bool

whether the endKey/endKeyDocId values should be inclusive or exclusive.

Tags
since
4.0.0
Return values
ViewOptions

key()

Sets the specific key to fetch from the index.

public key(mixed $key) : ViewOptions
Parameters
$key : mixed

the key to fetch from the index.

Tags
since
4.0.0
Return values
ViewOptions

keys()

Sets the specific set of keys to fetch from the index.

public keys(array<string|int, mixed> $keys) : ViewOptions
Parameters
$keys : array<string|int, mixed>

the keys to fetch from the index.

Tags
since
4.0.0
Return values
ViewOptions

limit()

Sets the number of documents to limit the result to.

public limit(int $limit) : ViewOptions
Parameters
$limit : int

the number of documents to limit to.

Tags
since
4.0.0
Return values
ViewOptions

namespace()

Sets whether the SDK should prefix the design document name with a "dev_" prefix.

public namespace(int $namespace) : ViewOptions
Parameters
$namespace : int

whether the SDK should prefix the design document name with a "dev_" prefix..

Tags
since
4.0.0
Return values
ViewOptions

order()

Sets the order of the results.

public order(int|string $order) : ViewOptions
Parameters
$order : int|string

the order of the results.

Tags
since
4.0.0
Return values
ViewOptions

range()

Sets the range of keys to skip to before beginning to return results and to stop returning results at.

public range(mixed $start, mixed $end[, bool $inclusiveEnd = false ]) : ViewOptions
Parameters
$start : mixed

the key to skip to before beginning to return results.

$end : mixed

the key to stop returning results at.

$inclusiveEnd : bool = false

whether the endKey values should be inclusive or exclusive.

Tags
deprecated
since
4.0.0
Return values
ViewOptions

reduce()

Whether to run the reduce function associated with the view index.

public reduce(bool $reduce) : ViewOptions
Parameters
$reduce : bool

whether to apply the reduce function.

Tags
since
4.0.0
Return values
ViewOptions

skip()

Sets the number of documents to skip for the query.

public skip(int $skip) : ViewOptions
Parameters
$skip : int

the number of documents to skip.

Tags
since
4.0.0
Return values
ViewOptions

startKey()

Sets the key to skip to before beginning to return results.

public startKey(mixed $key) : ViewOptions
Parameters
$key : mixed

the key to skip to before beginning to return results.

Tags
since
4.0.0
Return values
ViewOptions

startKeyDocId()

Sets the document id to start returning results at within a number of results should startKey have multiple entries within the index.

public startKeyDocId(string $key) : ViewOptions
Parameters
$key : string

the key to use.

Tags
since
4.0.0
Return values
ViewOptions

timeout()

Sets the operation timeout in milliseconds.

public timeout(int $milliseconds) : ViewOptions
Parameters
$milliseconds : int

the operation timeout to apply

Tags
since
4.0.0
Return values
ViewOptions

        

Search results