You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using :batchone with pgx/v4 and the "emit_result_struct_pointers": true, the QueryRow method does not use a pointer for the model when closed and calling the callback:
It looks like the batchCode template was updated recently (in e505aec), but besides defining an error type I don't see a change in the diff that would fix the problem.
Looking back before that most recent update to the template, there was a patch merged that addressed this issue. There is discussion on this prior issue thread: #1959
Based on the activity in that thread, I think the patch did not make it into the 1.17.2 release (it was merged one day after). But it should be in the next release.
Version
1.17.2
What happened?
When using
:batchone
withpgx/v4
and the"emit_result_struct_pointers": true
, theQueryRow
method does not use a pointer for the model when closed and calling the callback:Here, the callback expects an
*Author
, but it's gettingf(t, i, ...)
wherei
is anAuthor
, not an*Author
.I think this should be
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/303a2261c50646777b637a96f62d00ede88494b8dda5cb88f3311eee3d9b8e99
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: