jschaf / pggen

Generate type-safe Go for any Postgres query. If Postgres can run the query, pggen can generate code for it.
MIT License
282 stars 26 forks source link

Fix null slice return #6

Closed td0m closed 3 years ago

td0m commented 3 years ago

This should fix JSON marshaller that serialises null array pointers to nil rather than [].

More about it here.

jschaf commented 3 years ago

Thanks! Looks like it works as expected. There's an edge-case with a :one type query that returns an array like SELECT null::int[]. I can deal with that in a follow up PR.