Description
When creating a boolean (nullable) column in Postgres.
When generating code from SQL that retrieves this column, it becomes results.getBoolean()
.
Reading ResultSet.java, it states
"Returns: the column value; if the value is SQL NULL, the value returned is false."
Ideally, if the table contains null, I would like it to return null.
I would like to hear the maintainer's opinion on this.
Metadata
Metadata
Assignees
Labels
No labels
Activity
ResultSet.getObject
to respect nullable columns of the basic SQL data types #22ichizero commentedon Feb 17, 2024
Thanks for creating the issue! We are facing the same problem.
I think it would be better to follow the implementation of
java.sql.ResultSet.getObject
rather than doing the implementation for each types in sqlc-gen-kotlin.I've created a PR and would appreciate your consideration.