Replies: 3 comments 1 reply
-
This is the composite type scenario. I'm also yearning for this functionality. In postgres the query would look like.
It's how you would do graphql style queries in postgresql instead of something like
Unfortunately I don't think it is supported in sqlc. One workaround is to go through json using
|
Beta Was this translation helpful? Give feedback.
-
I also have interest on this feature but the issue seems to be stale, no consideration as feature request? |
Beta Was this translation helpful? Give feedback.
-
As mentioned in the first comment, this requires support for composite types, which currently isn't being worked on. I'm open to someone doing the work, but I think it would be a heavy lift with our current architecture. |
Beta Was this translation helpful? Give feedback.
-
I have a many to many relationship in postgres:
I need to search for the user and all his posts, but SQL does not generate a struct of type
[]Posts
ending up like this:I need it to look like this:
my query:
Is it possible to do this with sqlc?
Beta Was this translation helpful? Give feedback.
All reactions