Key encodings
LUMA stores everything as ordered key and value pairs. This section describes how the SQL layer, the search layer, the Redis-compatible layer and the catalog turn their data into keys (spec section 6). The SEAM data file itself only sees opaque user keys; it sorts them bytewise.
Keys are built from one first byte that names the owner, then fixed-width ids, then values written with an order-preserving encoding, so that bytewise order of the key equals the logical order.
Pages in this section
Section titled “Pages in this section”| Page | What it covers |
|---|---|
| Internal key and MVCC | user key, commit timestamp, kind, and ordering |
| Order-preserving values | encode_key_value for each type |
| Keyspace map | every first byte |
| Table rows | primary-key layout of row keys |
| Interleaved tables | child rows under their parent |
| Row format v1 | the value of a row |
| Index entries | unique, non-unique and JSON-path indexes |
| Foreign keys | reverse lookups |
| RESP keys | the Redis-compatible layer |
| Materialized view keys | view ids and cursor keys |
Posting keys have their own section, see Postings. Catalog keys are under Catalog records.
Evolution
Section titled “Evolution”Logical encodings evolve additively: a new version byte, a new tag or a new kind, never a migration of existing bytes (SPEC V461). See Compatibility rules.