go-jet / jet

Type safe SQL builder with code generation and automatic query result data mapping
Apache License 2.0
2.23k stars 110 forks source link

Support for SQLite FTS5? #347

Closed intaek-h closed 2 months ago

intaek-h commented 2 months ago

Does jet support FTS5?

I want to create a virtual FTS5 table for search queries. But jet doesn't seem to acknowledge it. Correct me if I'm wrong because maybe I am missing something.

CREATE VIRTUAL TABLE JobPostings_fts USING fts5 (
    title,
    short_description,
    full_description,
    address
);
jet -source=sqlite -dsn="./local.db" -schema=part-time-mothers -path=./.gen
Retrieving schema information...
Error trace:
 - failed to query database metadata:
 - failed to get  tables metadata:
 - failed to query column metadata:
 - failed to query 'JobPostings_fts' column metadata:
 - jet:
 - no such module:
 - fts5
intaek-h commented 2 months ago

I guess Jet generator is not working when I have that USING fts5 query. I thought of using raw query for FTS statements but that's also not possible when Jet generator is failing. Full text search is critical to my project. Please help me make the decision.

intaek-h commented 2 months ago

found out that this is not the problem of Jet, but me not enabling fts extension when compiling my sqlite db. closing.