Skip to content

Commit e84e1fc

Browse files
author
Marcus Pousette
committed
tests(vec0-native): use anonymous placeholders (?, ?) to avoid better-sqlite3 CI binding differences; keep adapter smarter binding as well
1 parent b9106aa commit e84e1fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dist-tests/vec0-native.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test('vec0 create/insert/query works (native ext present)', async () => {
1414
await db.exec('CREATE VIRTUAL TABLE IF NOT EXISTS v USING vec0(vector float[3])');
1515

1616
const toVec = () => new Float32Array([Math.random(), Math.random(), Math.random()]);
17-
const ins = await db.prepare('INSERT INTO v(rowid,vector) VALUES(?1,?2)');
17+
const ins = await db.prepare('INSERT INTO v(rowid,vector) VALUES(?, ?)');
1818
for (let i = 1; i <= 4; i++) {
1919
const vec = toVec();
2020
if (process.env.SQLITE3_VEC_DEBUG === '1') {
@@ -25,7 +25,7 @@ test('vec0 create/insert/query works (native ext present)', async () => {
2525

2626
const probe = toVec();
2727
const q = await db.prepare(
28-
'SELECT rowid, vec_distance_l2(vector, ?1) AS d FROM v ORDER BY d LIMIT 2',
28+
'SELECT rowid, vec_distance_l2(vector, ?) AS d FROM v ORDER BY d LIMIT 2',
2929
);
3030
const rows = q.all([probe.buffer]);
3131
if (process.env.SQLITE3_VEC_DEBUG === '1') {

0 commit comments

Comments
 (0)