sqlite-vec
sqlite-vec copied to clipboard
Delete/Update fail with non-integer primary key
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'
}
Hey @achrafash thanks for the report! Definitely a bug, working on a solution
@achrafash can you try v0.1.2-alpha.2 and see if the issue is fixed on your side? https://github.com/asg017/sqlite-vec/releases/tag/v0.1.2-alpha.2
it does! thanks a lot that was fast 🙏