Skip to main content

delete_vec

Function delete_vec 

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

Deletes the vector row for memory_id from memory_embeddings.

Called during forget and purge to keep the embeddings table consistent with the logical state of memories. FK CASCADE on memory_embeddings.memory_id handles the common case, but this function exists so callers can delete the embedding first (preserving the row in memories for audit).

ยงErrors

Returns Err(AppError::Database) on any rusqlite failure.