better-sqlite3 icon indicating copy to clipboard operation
better-sqlite3 copied to clipboard

Support for the FTS5 extension?

Open mrpengxinwen opened this issue 1 year ago • 1 comments

const st1 = db.prepare(SELECT * FROM t_content_idx where t_content_idx match 'a')

it return null ,why? the better-sqlit3 don't support fts5 extenssion?

mrpengxinwen avatar Sep 11 '24 01:09 mrpengxinwen

By default better-sqlite3 compiles SQLite with SQLITE_ENABLE_FTS5.

Your code produces:

SqliteError: no such table: t_content_idx

Please provide a complete self-contained reproduction using an in-memory db.

import Database from 'better-sqlite3'

const db = new Database(':memory:');

// Your setup code

console.log(db.prepare(`SELECT * FROM t_content_idx where t_content_idx match 'a'`).all());

Prinzhorn avatar Sep 11 '24 06:09 Prinzhorn

Closing (abandoned by @mrpengxinwen)

mceachen avatar Oct 22 '24 03:10 mceachen