Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rowid doesn't work with SQLite FTS5 tables #3901

Open
ajeetdsouza opened this issue Mar 26, 2025 · 0 comments · May be fixed by #3902
Open

rowid doesn't work with SQLite FTS5 tables #3901

ajeetdsouza opened this issue Mar 26, 2025 · 0 comments · May be fixed by #3902
Labels
📚 sqlite bug Something isn't working 💻 darwin

Comments

@ajeetdsouza
Copy link

Version

1.28.0

What happened?

When creating a virtual table like so:

CREATE VIRTUAL TABLE my_fts USING fts5 (
    name,
    description,
    content = '',
    contentless_delete = 1,
    tokenize = 'porter'
);

SQLite automatically adds an extra rowid (int64) column to all fts5 virtual tables. However, this is not reflected in the schema. When I add a query like this:

-- name: InsertMyFTS :exec
INSERT INTO
    my_fts (rowid, name, description)
VALUES
    (?, ?, ?);

and call sqlc generate, I get this error:

query.sql:12:1: column "rowid" does not exist

Relevant log output

No response

Database schema

No response

SQL queries

No response

Configuration

No response

Playground URL

https://play.sqlc.dev/p/532901fd9d2cc8fac478892fb0bb29ffeea565c6dd7cff593ae24f3e8f991ce8

What operating system are you using?

macOS

What database engines are you using?

SQLite

What type of code are you generating?

Go

@ajeetdsouza ajeetdsouza added the bug Something isn't working label Mar 26, 2025
@ajeetdsouza ajeetdsouza linked a pull request Mar 26, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 sqlite bug Something isn't working 💻 darwin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant