Skip to main content

open_cache_vec

Function open_cache_vec 

Source
pub fn open_cache_vec(
    journal: &Journal,
    embedding_dim: u32,
) -> Result<Connection>
Expand description

Open (or create) the cache with the sqlite-vec extension loaded.

Behaves identically to open_cache for the base schema, then additionally ensures that the entry_vectors vec0 virtual table exists with the requested embedding_dim.

If a vector table with a different dimension is already present it is dropped and recreated — all previously stored embeddings are lost.