sqlc
sqlc copied to clipboard
go/sqlite: SUM of INTEGER field has inferred type NullFloat64
Version
1.25.0
What happened?
SUM of INTEGER field has inferred type NullFloat64 when it can be inferred as NullInt64
Relevant log output
No response
Database schema
CREATE TABLE foo (
length INTEGER
);
SQL queries
-- name: Total :one
SELECT SUM(length) FROM foo;
Configuration
{
"version": "2",
"sql": [{
"schema": "schema.sql",
"queries": "query.sql",
"engine": "sqlite",
"gen": {
"go": {
"out": "db"
}
}
}]
}
Playground URL
https://play.sqlc.dev/p/fc0445bb897ac6b1673d488a213348451a837c209c900b4daa377cb37cc8268e
What operating system are you using?
Linux
What database engines are you using?
SQLite
What type of code are you generating?
Go