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
Extra returning fields in UpdateRequest.apply #730
Sometimes there is need to retrieve some server updated fields in the in-memory instance:
user=awaitUser.create()
print(user.updated_at) # updated_at_1awaituser.update(balance=User.balance+100).apply()
print(user.updated_at) # updated_at_2, and it should not be equal to updated_at_1
Unfortunately, gino only retrieves updated fields like
# in `crud.py`clause= (
type(self._instance)
.update.where(
self._locator,
)
.values(
**self._instance._get_sa_values(values),
)
.returning(
*[getattr(cls, key) forkeyinvalues], # <- only updated values will return
)
.execution_options(**opts)
)
I'd like to specify some "extra fields" here, maybe in this form:
Activity