Documentation

UpsertOptions
in package

Table of Contents

$durabilityLevel  : string|null
$expirySeconds  : int|null
$expiryTimestamp  : int|null
$preserveExpiry  : bool|null
$timeoutMilliseconds  : int|null
$transcoder  : Transcoder
__construct()  : mixed
build()  : UpsertOptions
Static helper to keep code more readable
durabilityLevel()  : UpsertOptions
Sets the durability level to enforce when writing the document.
encodeDocument()  : array<string|int, mixed>
Delegates encoding of the document to associated transcoder
expiry()  : UpsertOptions
Sets the expiry time for the document.
preserveExpiry()  : UpsertOptions
Sets whether the original expiration should be preserved (by default Replace operation updates expiration).
timeout()  : UpsertOptions
Sets the operation timeout in milliseconds.
transcoder()  : UpsertOptions
Associate custom transcoder with the request.

Properties

$durabilityLevel

private string|null $durabilityLevel = null

$timeoutMilliseconds

private int|null $timeoutMilliseconds = null

Methods

__construct()

public __construct() : mixed
Tags
since
4.0.0
Return values
mixed

encodeDocument()

Delegates encoding of the document to associated transcoder

public static encodeDocument(UpsertOptions|null $options,  $document) : array<string|int, mixed>
Parameters
$options : UpsertOptions|null
$document :
Tags
since
4.0.0
Return values
array<string|int, mixed>

expiry()

Sets the expiry time for the document.

public expiry(int|DateTimeInterface $seconds) : UpsertOptions
Parameters
$seconds : int|DateTimeInterface

the relative expiry time in seconds or DateTimeInterface object for absolute point in time

Tags
since
4.0.0
Return values
UpsertOptions

preserveExpiry()

Sets whether the original expiration should be preserved (by default Replace operation updates expiration).

public preserveExpiry(bool $shouldPreserve) : UpsertOptions
Parameters
$shouldPreserve : bool

if true, the expiration time will not be updated

Tags
since
4.0.0
Return values
UpsertOptions

timeout()

Sets the operation timeout in milliseconds.

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

the operation timeout to apply

Tags
since
4.0.0
Return values
UpsertOptions

        

Search results