- Notifications
You must be signed in to change notification settings - Fork976
Use model struct as method parameter#875
-
BetaWas this translation helpful?Give feedback.
All reactions
👍 12
Replies: 4 comments 3 replies
-
Hi. Has anything become of this idea? |
BetaWas this translation helpful?Give feedback.
All reactions
-
Nothing has been decided. If we do add support for this, it will need to go behind a configuration flag so that we don't break existing applications. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I would love to see this implemented. Sometimes it's also easier to pass the full entity around instead of having to create another for the occasion of executing a DB query, even if the query doesn't use all fields of the entity. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 2
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
This can make creating queries for seeding the database a lot easier, otherwise, you'll end up with two I'd like to know if there is any way right now to do this nicely. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Seems like a flag in -- name: PersistNewCity :entity :oneINSERT INTO city (* )VALUES (** )RETURNING*; results in func (q*Queries)PersistNewCity(ctx context.Context,argCity) (City,error) { where expands |
BetaWas this translation helpful?Give feedback.
All reactions
👍 4
-
+1 How do maintainers feel about it? We can probably help open a PR |
BetaWas this translation helpful?Give feedback.
All reactions
👍 3
-
We really need it |
BetaWas this translation helpful?Give feedback.
All reactions
This discussion was converted from issue #872 on February 02, 2021 06:38.