Skip to main content

Module uuid

Module uuid 

Source
Expand description

UUIDv7 generation and Arrow/Parquet serialisation helpers.

All write paths (CREATE, MERGE, batch ingest, provenance) mint UUIDv7 identifiers for new first-class objects. Centralising generation here keeps identity consistent across crates and provides the FixedSizeBinary(16) conversions used by the storage layer.

UUIDv7 is time-ordered (RFC 9562): the 48 most-significant bits are a Unix-millisecond timestamp, so identifiers minted later sort after earlier ones — useful for stable, roughly-chronological row ordering.

Structs§

Uuid
A Universally Unique Identifier (UUID).

Constants§

PROVENANCE_NAMESPACE
Namespace UUID for GraphForge provenance lineage (#604): the stable root for content-addressed derived-fact handles. A fixed constant — never regenerate it, or existing lineage child_uuids stop resolving.

Functions§

from_bytes
Reconstruct a Uuid from its 16-byte big-endian form.
new_v5
Mint a name-based (UUIDv5, SHA-1) identifier under namespace. The same (namespace, name) always yields the same UUID, so it content-addresses a derived fact: re-running a query re-derives the identical child_uuid, letting lineage rows dedup/accumulate idempotently rather than growing unboundedly. (#604)
new_v7
Generate a new UUIDv7 stamped with the current time.
to_bytes
Convert a Uuid into its 16-byte big-endian form, suitable for an Arrow FixedSizeBinary(16) column.
to_string
Render a Uuid in canonical hyphenated form for display.