- 
  Notifications
 You must be signed in to change notification settings 
- Fork 962
-
So I wanted to add my own methods to generated structs, is it possible out of the box? Sorry wasn't able to figure out from the docs. Using https://docs.sqlc.dev/en/stable/tutorials/getting-started-postgresql.html as an example I want to add e.g.
func (a *Author) IsClassic() bool { return a.Name == "Hemingway" || a.Name == "Tolstoy" }
PS. Big thanks for all the folks opensoursing and maintaining this ❤️
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
 
 Sign up for free
 to join this conversation on GitHub.
 Already have an account?
 Sign in to comment