Expand description
Chunk storage CRUD for multi-chunk memories.
Manages the memory_chunks table: insert embeddings for bodies that
exceed the 512-token E5 limit and query chunks for vector search.
Structs§
- Chunk
- Chunk.
Functions§
- count_
for_ memory - GAP-SG-40: counts the rows actually persisted in
memory_chunksfor a memory. Single-chunk bodies are stored inline in thememoriesrow and append no chunk rows, so this returns0for them; multi-chunk bodies return the exact number of persisted chunk rows. Callers query this AFTER the transaction commits so the reportedchunks_persistedreflects the observable database state rather than a pre-commit estimate. - delete_
chunks - Delete chunks.
- get_
chunks_ by_ memory - Get chunks by memory.
- insert_
chunk_ slices - Insert chunk slices.
- insert_
chunks - Insert chunks.
- knn_
search_ chunks - KNN search chunks.
- upsert_
chunk_ vec - Upsert chunk VEC.