You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(sqlite-vec): vector search via statically-linked sqlite-vec
Add react-native-nitro-sqlite-vec: a companion package vendoring the
sqlite-vec v0.1.9 amalgamation. Its native sources compile INTO the core
react-native-nitro-sqlite library's single sqlite3 build and register via
sqlite3_auto_extension — no second sqlite3, no runtime extension loading.
Vector search runs through the core's existing execute() API (vec0 +
vec_* functions); thin typed helpers (vecVersion/createVectorTable/
knnSearch) are included.
Core integration:
- Android: CMakeLists/build.gradle flag-gated compilation of the
companion's sqlite-vec.c (-DSQLITE_CORE -DSQLITE_VEC_STATIC), enabled
in the example via gradle.properties `nitroSqliteVec=true`.
- iOS: companion RNNitroSqliteVec.podspec, static-linked into the core's
single sqlite3 through the core podspec.
- operations.cpp registers the extension once in sqliteOpenDb
(#ifdef NITRO_SQLITE_VEC); bindStatement binds whole-number JS values
as INTEGER (vec0 rowid/pk/partition require INTEGER); sqliteExecuteBatch
fixes a double-rollback that masked the real batch error.
Testing: on-device React Native Harness spec
(example/tests/harness/sqlite-vec.harness.ts) covering vec_* scalar
functions, distance metrics, vec0 KNN (float32/int8/bit), metadata
filtering, partition keys, auxiliary columns, and UPDATE/DELETE.
* fix: comments
* fix: prettier
* chore: update `Podfile.lock`
* fix: enable sqlite-vec in example project
---------
Co-authored-by: Christoph Pader <chris@margelo.com>
0 commit comments