Open feluelle opened 1 week ago
That's a good point and should be pretty simple to implement. Would you like to work on it maybe?
Let's add optional returning parameter as a list of fields and chain the stmt with .returning if it's present.
Yes, I can give it a try. :)
Unfortunately, that would probably mean we need to remove the commit
arg and ideally we do the same as we do for get
and return the data as a model. I would even suggest we split the current function into update
and update_multi
.
Is your feature request related to a problem? Please describe.
When performing an update, I am missing the option to retrieve the updated model. I explicitly have to get the updated model from the DB.
Describe the solution you'd like
I would like to leverage the sqlalchemy Update returning clause which allows returning the data after the update has been performed.