Skip to main content

clear_memory_graph_bindings

Function clear_memory_graph_bindings 

Source
pub fn clear_memory_graph_bindings(
    conn: &Connection,
    memory_id: i64,
) -> Result<(u64, u64), AppError>
Expand description

GAP-SG-51: clears every memory_entities and memory_relationships binding for a memory so a --force-merge --replace-graph update can install an authoritative set (including the empty set). The entities and relationships themselves are preserved; only the junction rows for this memory are removed. Returns (entity_bindings_removed, relationship_bindings_removed).

ยงErrors

Returns AppError::Database when the underlying SQLite operation fails.