Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

### Fixed

- Compiling `sqlite-vec.c` with MSVC and `-DSQLITE_VEC_STATIC` succeeds; in that build `sqlite-vec.h` declared `sqlite3_vec_init()` with `__attribute__((visibility("default")))` on every compiler, and MSVC, which has no `__attribute__`, stopped with `error C2143`. GCC and Clang builds are unchanged.
- A KNN query that takes its query vector, `k`, or `mmr_lambda` from another table of a join now uses it. `select v.rowid from p join v on v.embedding match ? and v.k = p.k` failed with `A LIMIT or 'k = ?' constraint is required`; the same join with `v.k = 3 and v.mmr_lambda = p.lambda` returned no rows; and `select v.rowid from v join p on p.id = v.tag where v.embedding match p.vector and v.k = 2`, with `p.id` an integer primary key, could return no rows. These joins now run one KNN per row of the other table, so a filter on the `vec0` table whose value comes from that table applies before the k nearest rows are chosen. Ported in part from the unmerged [vlasky#14](https://github.com/vlasky/sqlite-vec/pull/14) ([asg017#331](https://github.com/asg017/sqlite-vec/pull/331)), which also applies filters whose value comes from a joined table before the k nearest rows are chosen; that part is not ported, and ARCHITECTURE.md's idxStr section says why.

## [2.1.1] - 2026-10-09
Expand Down
4 changes: 4 additions & 0 deletions sqlite-vec.h.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@
#endif

#ifdef SQLITE_VEC_STATIC
#if defined(__GNUC__) && !defined(_WIN32)
#define SQLITE_VEC_API __attribute__((visibility("default")))
#else
#define SQLITE_VEC_API
#endif
#else
#ifdef _WIN32
#define SQLITE_VEC_API __declspec(dllexport)
#else
Expand Down