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
$digest
public
mixed
$digest
$namespace
public
mixed
$namespace
$partition_id
public
mixed
$partition_id
$setname
public
mixed
$setname
$value
public
mixed
$value
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>getDigest()
get_digest returns key digest as string.
public
getDigest() : string
Return values
stringgetDigestBytes()
get_digest_bytes returns key digest as byte array.
public
getDigestBytes() : array<string|int, mixed>
Return values
array<string|int, mixed>getNamespace()
namespace. Equivalent to database name.
public
getNamespace() : string
Return values
stringgetSetname()
Optional set name. Equivalent to database table.
public
getSetname() : string
Return values
stringgetValue()
getValue() returns key's value.
public
getValue() : mixed
partitionId()
PartitionId returns the partition that the key belongs to.
public
partitionId() : int|null