Skip to content

Add FTS5 support to sqlite #1797

Description

@kkyr

What do you want to change?

Add FTS5 support to sqlite engine.

schema.sql

CREATE TABLE recipes (
    id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    name TEXT NOT NULL,
);

CREATE VIRTUAL TABLE recipes_fts USING FTS5 (
    name,
    content='recipes',
    content_rowid='id'
);

-- (triggers omitted)

query.sql

-- name: SearchRecipes :many
SELECT rowid, * FROM recipes_fts
WHERE recipes_fts MATCH ?;

Running sqlc generate on the above input results in the following error:

db/sqlite/query.sql:17:1: relation "recipes_fts" does not exist

What database engines need to be changed?

sqlite

What programming language backends need to be changed?

Go

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions