Closed mvrhov closed 2 years ago
Yes, this is the feature I want most as well and the one I'll implement next. I want it for the same reason: to avoid duplicating From/To functions.
There's a hacky workaround if you use the Batch and Scan methods. You can use the Scan method for any enqueued Batch as long as the types match up.
Duplicate of #44. I'll consolidate discussion over in that issue.
I'm evaluating a pggen to use it instead of sqlc, but there a re thing that sqlc does better, one of them is reuse of return types. The pggen generates a ton of types and it doesn't check if the types could be reused by different queries. This is especially annoying as one must do another ton of copy From/To functions for basic CRUD methods because