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
{{ message }}
Repository navigation
Support emitting accessor methods to enable Go interfaces? #2746
It would sometimes be handy to be able to handle multiple database rows with common field names using some Go code which implements generic operations (for example, checking that a user token contains a group claim that matches the group_id of some database object).
It would be handy in these cases if the objects all implemented a GetGroupID() method, which could be used to match the types to an interface. For example:
@evankanderson This isn't something we're planning on adding to sqlc, as we think it's better served by using a separate tool to generate these interfaces from structs. See my comment here #2471 (comment)
Activity
kyleconroy commentedon Sep 20, 2023
@evankanderson This isn't something we're planning on adding to sqlc, as we think it's better served by using a separate tool to generate these interfaces from structs. See my comment here #2471 (comment)