feat(sqlite-vec): vector search#285
Open
riteshshukla04 wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.