Documentation

Key
in package

Key is the unique record identifier. Records can be identified using a specified namespace, an optional set name, and a user defined key which must be unique within a set.

Records can also be identified by namespace/digest which is the combination used on the server.

Table of Contents

Properties

$digest  : mixed
$namespace  : mixed
$partition_id  : mixed
$setname  : mixed
$value  : mixed

Methods

__construct()  : mixed
computeDigest()  : array<string|int, mixed>
Generate unique server hash value from set name, key type and user defined key.
getDigest()  : string
get_digest returns key digest as string.
getDigestBytes()  : array<string|int, mixed>
get_digest_bytes returns key digest as byte array.
getNamespace()  : string
namespace. Equivalent to database name.
getSetname()  : string
Optional set name. Equivalent to database table.
getValue()  : mixed
getValue() returns key's value.
partitionId()  : int|null
PartitionId returns the partition that the key belongs to.

Properties

Methods

__construct()

public __construct(string $namespace, string $set, mixed $key) : mixed
Parameters
$namespace : string
$set : string
$key : mixed

computeDigest()

Generate unique server hash value from set name, key type and user defined key.

public computeDigest() : array<string|int, mixed>

The hash function is RIPEMD-160 (a 160 bit hash).

Return values
array<string|int, mixed>

getDigestBytes()

get_digest_bytes returns key digest as byte array.

public getDigestBytes() : array<string|int, mixed>
Return values
array<string|int, mixed>

partitionId()

PartitionId returns the partition that the key belongs to.

public partitionId() : int|null
Return values
int|null

        
On this page

Search results