Skip to main content

upsert_entity_vec

Function upsert_entity_vec 

Source
pub fn upsert_entity_vec(
    conn: &Connection,
    entity_id: i64,
    namespace: &str,
    _entity_type: EntityType,
    embedding: &[f32],
    _name: &str,
) -> Result<(), AppError>
Expand description

Replaces the vector row for an entity in entity_embeddings.

v1.0.76: sqlite-vec was removed. Embeddings live in a regular BLOB-backed table; cosine similarity is computed in pure Rust on demand. The entity_type and name arguments are accepted for API compatibility but are not stored — the entities table is the source of truth.

§Errors

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