Expand description
Type-Aware Metadata Storage
Provides efficient, normalized metadata storage inspired by ChromaDB’s approach of using separate columns for each data type.
§Type-Aware Pattern
Instead of a single variant column that wastes space:
| id | key | string_val | int_val | float_val | bool_val |
| 1 | "name" | "Alice" | NULL | NULL | NULL |
| 1 | "age" | NULL | 25 | NULL | NULL |We store in type-specific B-trees:
string_values: (entity_id, key) → String
int_values: (entity_id, key) → i64
float_values: (entity_id, key) → f64
bool_values: (entity_id, key) → boolBenefits:
- No NULL storage overhead
- Type-specific indexing (range queries on ints)
- Efficient filtering
Structs§
- Metadata
- Metadata for an entity (key-value pairs)
- Metadata
Storage - Type-aware metadata storage
Enums§
- Metadata
Filter - Metadata filter operations
- Metadata
Type - Metadata type enumeration
- Metadata
Value - Metadata value types
- RefTarget
- Reference target for metadata cross-links
- Typed
Column - Type-specific column for efficient storage