Skip to main content

create_vec_embeddings_ddl

Function create_vec_embeddings_ddl 

Source
pub fn create_vec_embeddings_ddl(dims: usize) -> String
Expand description

DDL for the sqlite-vec ANN virtual table.

This is created only when the sqlite-vec extension is available (i.e. after [crate::vec_ext::register_vec_extension] has been called and a connection opened). The dimension count is passed at table-creation time; the default of 768 matches nomic-embed-text-v1.5.

vec0 tables store only (rowid, vector). Metadata is fetched by JOIN-ing back to the embeddings table using the rowid.