Open bbkane opened 10 months ago
I'll be able to avoid this issue once https://github.com/sqlc-dev/sqlc/issues/2800 is implemented (I think can force a parameter to be null - still not sure how to override names in my SQLite queries).
Also see : https://github.com/sqlc-dev/sqlc/issues/2183
Duplicate of https://github.com/sqlc-dev/sqlc/issues/937
Version
1.25.0
What happened?
I'm trying this
I expected the generated
UpdateEnvParams
to contain nullable types since:NOT NULL
fieldsCOALESCE(?, <fieldname>)
Since the field is constrained as NOT NULL in the schema, then this allows updating a field when
?
is not null, and leaving the field alone if?
is null.Ideally, the user would pass some null fields and some not-null fields and I could pass those through to
sqlc
transparently via the generatedUpdateEnvParams
that would contain nullable types to pass to the SQL.This code is hosted at https://github.com/bbkane/namedenv/
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
No response
What operating system are you using?
macOS
What database engines are you using?
SQLite
What type of code are you generating?
Go