sqlite-vec icon indicating copy to clipboard operation
sqlite-vec copied to clipboard

Delete/Update fail with non-integer primary key

Open achrafash opened this issue 6 months ago • 3 comments

Thanks for the amazing work as always! (was a user of sqlite-vss before)

Not sure if related to #53, but updating/deleting records when using a string as primary key fails (“unknown error”).

Configuration:

create table articles (
   id text primary key,
   headline text,
   url text
);

create virtual table if not exists vec_articles using vec0(
   article_id text primary key,
   embedding float[384],
);

Inserting and selecting work fine, but updating or deleting throws the following error:

SqliteError: unknown error
    at file:///Users/achraf/test-sqlite-vec/index.mjs:25:48
    at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
    at async loadESM (node:internal/process/esm_loader:28:7)
    at async handleMainPromise (node:internal/modules/run_main:113:12) {
  code: 'SQLITE_EMPTY'
}

achrafash avatar Aug 09 '24 15:08 achrafash