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

go/sqlite: SUM of INTEGER field has inferred type NullFloat64 #3122

Open
darkfeline opened this issue Jan 10, 2024 · 0 comments
Open

go/sqlite: SUM of INTEGER field has inferred type NullFloat64 #3122

darkfeline opened this issue Jan 10, 2024 · 0 comments
Labels
bug Something isn't working triage New issues that hasn't been reviewed

Comments

@darkfeline
Copy link

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

@darkfeline darkfeline added bug Something isn't working triage New issues that hasn't been reviewed labels Jan 10, 2024
@darkfeline darkfeline changed the title SUM of INTEGER field has inferred type NullFloat64 go/sqlite: SUM of INTEGER field has inferred type NullFloat64 Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage New issues that hasn't been reviewed
Projects
None yet
Development

No branches or pull requests

1 participant