Per-key revisioned record in Concord's MVCC store.
Every key in Concord is backed by a Record that tracks its full revision
history metadata. Records are the internal representation stored in ETS;
the public API can return either bare values (for backward compatibility)
or full records (with metadata: true).
Fields
value— The stored value (any Erlang term)create_revision— Cluster revision when the key was first created (resets on delete-and-recreate)mod_revision— Cluster revision of the latest mutationversion— Count of writes since creation;0means tombstone (deleted)expires_at— Absolute timestamp (seconds) of TTL expiry, ornillease_id— Lease this key is attached to, ornilcontent_type— Optional MIME-ish hint (e.g.,"text/markdown")metadata— Optional application-level metadata map
Summary
Functions
Returns true if this record has expired based on the given current time.
Creates a tombstone record for a deleted key.
Returns true if this record is a tombstone (deleted key).
Types
@type t() :: %Concord.KV.Record{ content_type: binary() | nil, create_revision: non_neg_integer(), expires_at: non_neg_integer() | nil, lease_id: non_neg_integer() | nil, metadata: map(), mod_revision: non_neg_integer(), value: term(), version: non_neg_integer() }
Functions
@spec expired?(t(), non_neg_integer()) :: boolean()
Returns true if this record has expired based on the given current time.
@spec tombstone(binary(), non_neg_integer(), t() | nil) :: t()
Creates a tombstone record for a deleted key.
Returns true if this record is a tombstone (deleted key).