Table definition
The value at 0x00 't' ‖ lower(table name) is the table definition, written by TableDef::encode (crates/strata-sql/src/catalog.rs:292). The table name in the key is lower-cased.
Layout
Section titled “Layout”id u32 LE ‖ str name ‖ varint ncols ‖ ncols × (str name ‖ type u8 ‖ flags u8 ‖ [varint len ‖ default as row-format])varint npk ‖ npk × varint columnvarint nidx ‖ nidx × (index_id u32 LE ‖ str name ‖ u8 (unique | kind << 1) ‖ varint ncols ‖ varint column*)ext* ext = tag u8 ‖ varint len ‖ body| Field | Encoding | Meaning |
|---|---|---|
id |
u32 LE | the table id |
name |
str |
the table name |
ncols and columns |
varint, then entries | see Column definition |
npk and column |
varint, then npk varints |
the primary-key columns |
nidx and indexes |
varint, then entries | see Index definition |
ext* |
zero or more entries | see Extension tags |
str is varint len ‖ utf8. Integers inside the definition are little-endian, unlike the big-endian ids in keys.