Skip to main content

Module keys

Module keys 

Source
Expand description

Byte-exact key constructors for the tenant keyspace.

Constants§

C_DEGREE
Counter: adjacency degree of a node in one direction.
C_DISTINCT
Counter: distinct dictionary values of (kind, label, pid).
C_LABEL
Counter: live records per label.
C_LONG_DISTINCT
Counter: distinct long values of (kind, label, pid) (non-zero C_LONG_VALUE rows), as C_DISTINCT is for the dictionary.
C_LONG_VALUE
Counter: occurrences of one long value of (kind, label, pid), keyed by its digest (long_value_digest): the value dictionary’s refcount for values too long for it.
C_LONG_VALUES
Counter: occurrences of (kind, label, pid) too long for the dictionary.
C_NULL
Counter: explicit-null occurrences of a pid.
C_REL_CATALOG
Counter: relationships by (type, source label, target label).
C_REL_SHAPE_PROP
Counter: relationships of (type, source label, target label) carrying a pid.
C_SUPPORT_BY_LABEL
Counter: owners carrying a pid, by (kind, label, pid).
C_SUPPORT_BY_PID
Counter: owners carrying a pid, by (kind, pid, label).
C_SUPPORT_TOTAL
Counter: owners carrying a pid (all labels).
C_USAGE
Counter: tenant-wide usage totals, one row per U_* metric.
DICT_MAX_VALUE_BYTES
Longest encoded (tag + payload) value that enters the value dictionary (DC10 refinement): longer values are counted in C_LONG_VALUES instead.
F_COUNTER
Typed family: derived counters (see the C_* sub-families).
F_INDEX_DEF
Typed family: index id → crate::index::IndexDef (JSON).
F_INDEX_ENTRY
Typed family (derived): (index id, tag, payload, owner) ordered entry.
F_INDEX_NAME
Typed family: index name → index id.
F_INDEX_PENDING
Typed family: (text index id, owner) → commit index of the newest change the text applier has not yet indexed (base rows).
F_LABEL
Typed family: (label, record ordinal) label membership.
F_MARKER
Typed family: sticky array markers.
F_OCC
Typed family: one canonical occurrence per (kind, owner, pid, elem).
F_PRESENCE
Typed family: (kind, label, pid, nullness, owner) presence.
F_RECORD_HDR
Typed family: record ordinal → (public id, label) header.
F_RECORD_ID
Typed family: public record id → record ordinal.
F_USAGE_BYTES
Typed family: the tenant’s logical stored bytes (key + value lengths of every live row under the tenant prefix except this one), maintained by the storage backend in the batch that changes them.
F_VALUE_DICT
Typed family: per-(kind, label, pid) value dictionary with refcounts.
LONG_DIGEST_BYTES
Bytes of a long value’s digest in long_value_key.
M_ARRAY_LABEL
Marker: array-holding owners of a pid under a label (a count).
NULLNESS_NULL
Presence nullness: every value the owner has for the pid is null.
NULLNESS_VALUE
Presence nullness: the owner has at least one non-null value for the pid.
P_DEFINITION
Key segment for property-definition rows.
P_EMB_ALIAS
Key segment for embedding-space alias mappings.
P_EMB_BINDING
Key segment for embedding bindings.
P_EMB_READY
Key segment for per-space ready-vector counts.
P_EMB_RECLAIM
Key segment for pending embedding-slot reclamations.
P_EMB_SPACE
Key segment for embedding-space definitions.
P_EMB_VECTOR
Key segment for stored embedding vectors.
P_EMB_VERSION
Key segment for per-space binding versions.
P_FAMILY
Key segment for property-family rows.
P_FAMILY_SIG
Key segment for property-family signatures.
P_META
Key segment for tenant metadata rows.
P_REL
Key segment for relationship rows by public id.
P_REL_BY_ORD
Key segment for relationship rows by dense ordinal.
P_REL_GROUP
Per-relationship captured endpoint labels (cascade-safe decrement source).
SECURITY_GENERATION_KEY
Legacy raw global generation key. Retained only for old-command replay and migration detection; new writes use security_generation_key(tenant).
SECURITY_POLICY_ACTIVE_KEY
Legacy raw global policy key; new writes use security_policy_key(tenant).
SYSTEM_NS
Namespace byte of system rows (not tenant-scoped), storage format v3.
SYS_TENANT_BY_ORD
System family: tenant ordinal → (scope digest, state u8).
SYS_TENANT_BY_SCOPE
System family: tenant scope digest → (ordinal u32 BE, state u8).
SYS_TENANT_SEQ
System family: next tenant ordinal to assign (u32 BE).
TENANT_NS
Namespace byte of tenant-owned rows, storage format v3.
TENANT_PREFIX_LEN
Length of the tenant key prefix [TENANT_NS][tenant u32 BE].
U_LABELS
Usage metric: labels with at least one live record.
U_PROPERTIES
Usage metric: property ids carried by at least one live record.
U_RECORDS
Usage metric: live records.
U_RELATIONSHIPS
Usage metric: live relationships.

Functions§

ann_manifest_meta_prefix
Prefix for durable ANN manifests owned by one tenant.
array_label_marker_key
Marker: owners of kind under label holding pid as an array; the value is their count (the row is absent at zero).
array_label_marker_prefix
Prefix of the per-label array markers of one pid.
counter_prefix
Prefix of one counter sub-family.
decode_counter
Decode a big-endian u64 counter value (absent → 0).
decode_record_hdr
Decode a record header value into (id, label).
degree_key
Counter: degree of node in one direction (true = outgoing).
describe_key
Human-readable rendering of a storage key for errors and logs: the tenant, the typed family name, and the remainder in hex (legacy /-separated keys keep their printable path).
distinct_key
Counter: distinct dictionary values of (kind, label, pid).
emb_alias_key
Key mapping an embedding-space alias to its space.
emb_binding_key
Key for one embedding binding of an owner property element.
emb_bindings_prefix
Prefix covering every embedding binding in a space.
emb_ready_count_key
Number of a space’s bindings in Ready status, maintained by every commit that writes a binding (big-endian u64). It is the pool a vector search ranks, read in one get to choose exact or ANN search.
emb_reclaim_key
Pending reclamation of a vector slot superseded at commit after_ci. The slot’s bytes may still be read by a pinned view until the GC watermark passes after_ci; the reclamation sweep deletes them only then. Ordered by after_ci so the sweep ranges straight to the reclaimable rows.
emb_reclaim_prefix
Prefix covering every pending embedding-slot reclamation for a tenant.
emb_reclaim_value
Value of a reclamation row: after_ci || space || slot (24 bytes), so the sweep can recover the vector key to delete without re-parsing the key.
emb_space_key
Key for an embedding-space definition by space id.
emb_space_version_key
Version row of a space’s binding set: prev_ci || ci (16 bytes), the commit that last changed the space’s bindings and the one before it. A cached ANN generation is current when its version equals ci, and an incremental absorb of commit ci chains onto it when its version equals prev_ci — independent of any other space or tenant’s commits.
emb_space_version_value
Encode a space version row.
emb_vector_key
Key for a stored embedding vector slot within a space.
encode_record_hdr
Encode a record header value: id (16) || label.
family_label
Coarse family name of any store key, for accounting and diagnostics: tenant families by their family byte, legacy segment keys by their first segment, and system/global keys by namespace. One classifier serves the layout and read-accounting tools.
index_def_key
Key of an index definition.
index_def_prefix
Prefix of every index definition of a tenant.
index_entry_key
Key of one ordered entry: entry is tag ‖ order-preserving payload.
index_entry_prefix
Prefix of one index’s entries.
index_name_key
Key mapping an index name to its id.
index_pending_key
Pending row of one owner of an applied index.
index_pending_prefix
Prefix of one index’s pending rows (owners its applier has yet to process: text and structural indexes).
key
Build a tenant keyspace key: [TENANT_NS][tenant u32 BE] followed by /-separated segments.
label_count_key
Counter: live records of a label.
label_member_key
LABEL: membership row of a record ordinal in a label.
label_member_prefix
Prefix of every member of one label.
label_members_prefix
Prefix of every label-membership row of a tenant.
long_distinct_key
Counter: distinct long values of (kind, label, pid).
long_value_digest
Digest of a long dictionary entry (tag || payload): the first LONG_DIGEST_BYTES of its SHA-256.
long_value_key
Counter: occurrences of the long value with digest of (kind, label, pid).
long_value_prefix
Prefix of the long-value refcounts of (kind, label, pid); the remainder of a key under it is a long_value_digest.
long_values_key
Counter: occurrences of (kind, label, pid) too long for the dictionary.
null_count_key
Counter: explicit-null occurrences of (kind, pid).
occ_key
OCC: the canonical occurrence of one (kind, owner, pid, elem).
occ_kind_prefix
Prefix of every occurrence of one owner kind in a tenant.
occ_owner_prefix
Prefix of every occurrence of one owner.
occ_pid_prefix
Prefix of every element of one owner’s pid.
owner_prefix
Key prefix for every row owned by records or relationships.
parse_emb_reclaim_value
Decode a reclamation row value into (after_ci, space, slot).
parse_emb_space_version
Decode a space version row; None for a malformed value.
parse_index_entry_key
(entry, owner) of an index entry key under prefix (index_entry_prefix).
parse_label_member_key
Parse a membership key into (label, ordinal).
parse_occ_key
Parse an occurrence key into (tenant, kind, owner, pid, elem).
parse_presence_key
Parse a presence key into (kind, label, pid, nullness, owner).
parse_record_hdr_key
The record ordinal of a RECORD_HDR key.
parse_tenant
The tenant owning a tenant-namespace key, if key is one.
prefix_range
Inclusive start / exclusive end range covering all keys under a prefix.
presence_key
PRESENCE: an owner carries pid (with the given nullness) under a label.
presence_nullness_prefix
Prefix of the presence rows of (kind, label, pid) with one nullness.
presence_pid_prefix
Prefix of every presence row of (kind, label, pid).
push_ord
Append value as an order-preserving variable-length integer: one length byte (0–8), then the value’s big-endian bytes without leading zeros (0 is the lone byte 0x00). A shorter encoding is a smaller number, so byte order equals numeric order, and the length byte makes the field self-delimiting, so a key prefix ending in it never matches a longer value (lever C: owner ordinals and property ids are mostly 1–4 bytes).
push_str
Append a u16 BE length + bytes string field.
read_ord
Read an integer written by push_ord at pos; returns the value and the position after it. Non-minimal encodings (a leading zero byte, or a length over 8) are rejected so every value has exactly one key.
read_ord_tail
Read a push_ord integer that must end key exactly at pos.
read_str
Read a u16 BE length + bytes string field at pos; returns the string and the position after it.
read_u64
Read a big-endian u64 at pos.
record_hdr_key
RECORD_HDR: ordinal → header.
record_hdr_prefix
Prefix of every record header of a tenant.
record_id_key
RECORD_ID: public id → ordinal.
record_id_prefix
Prefix of every record identity row of a tenant.
rel_catalog_key
Counter: relationships of (type, source label, target label).
rel_shape_prop_key
Counter: relationships of (type, source label, target label) that carry pid (creation-time endpoint labels, like rel_catalog_key).
rel_shape_prop_prefix
Prefix of the per-pid counters of one relationship shape.
security_generation_key
Key for a tenant’s security generation watermark.
security_policy_key
Key for a tenant’s active security policy.
security_prefix
Prefix covering all security rows of a tenant.
support_by_label_key
Counter: owners of kind under label carrying pid (label-major order).
support_by_label_prefix
Prefix of the per-pid support counters of one label.
support_by_pid_key
Counter: owners of kind under label carrying pid (pid-major order).
support_by_pid_prefix
Prefix of the per-label support counters of one pid.
support_total_key
Counter: owners of kind carrying pid.
tenant_by_ord_key
Directory row: ordinal → scope digest.
tenant_by_ord_prefix
Prefix of every ordinal → scope directory row (tenant enumeration).
tenant_by_scope_key
Directory row: scope digest → ordinal.
tenant_hex
Hex encoding used only for the small set of legacy-style, human-readable tenant metadata keys. Canonical record, vector, text, and security state remains under the binary tenant keyspace ([TENANT_NS][tenant u32]/...).
tenant_prefix
The 5-byte key prefix owned by tenant.
tenant_seq_key
Directory row holding the next ordinal to assign.
u64be
Big-endian 8-byte encoding of an ordinal, used as a key segment.
usage_bytes_key
The tenant’s logical stored bytes row (see F_USAGE_BYTES).
usage_count_key
Counter: one tenant-wide usage metric (U_*).
value_dict_key
VALUE_DICT: refcount of one (tag || payload) value of (kind, label, pid).
value_dict_prefix
Prefix of the value dictionary of (kind, label, pid); the remainder of a key under it is the (tag || order-preserving payload) value.
vector_index_meta_prefix
Prefix for durable vector-index definitions owned by one tenant.