sqlc
sqlc copied to clipboard
`rowid` doesn't work with SQLite FTS5 tables
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
Any idea when this is going to get merged in? I have the same issue.