Skip to main content

Module knowledge

Module knowledge 

Source
Expand description

Fact CRUD with FTS5 synchronization.

Every fact operation that touches facts_fts is transactional. See SPEC.md §8.3 for the insert/update/delete procedures.

Functions§

delete_fact_with_fts
Delete a fact and its FTS entry in a transaction.
delete_namespace
Delete all facts in a namespace atomically. Returns count of deleted facts.
get_fact
Get a fact by ID.
get_fact_embedding
Get a fact’s raw embedding bytes.
insert_fact_with_fts
Insert a fact and its FTS entry in a transaction.
insert_fact_with_fts_q8
Insert a fact with both f32 and quantized embeddings.
list_facts
List facts in a namespace with pagination.
update_fact_with_fts
Update a fact’s content and embedding, with FTS sync.