sqlc
sqlc copied to clipboard
go/sqlite: integer primary keys are inferred as nullable when declared separately
Version
1.25.0
What happened?
When a sqlite integer primary key is declared in a separate line, the generated type is nullable even though sqlite constrains the type to not null.
Relevant log output
No response
Database schema
CREATE TABLE foo (
aid INTEGER,
PRIMARY KEY (aid)
)
SQL queries
No response
Configuration
version: "2"
sql:
- engine: "sqlite"
schema: "schema.sql"
queries: "query.sql"
Playground URL
https://play.sqlc.dev/p/508b178450774b28762380c31ae03d768098ee4e6c3082570fe23d01486a9955
What operating system are you using?
Linux
What database engines are you using?
SQLite
What type of code are you generating?
Go