jschaf / pggen

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

Add example for querying with function out parameters #64

Closed jschaf closed 2 years ago

jschaf commented 2 years ago

The main trick is to SELECT FROM the function which converts the record type into proper postgres columns.

Fixes #25.