python-gino / gino

GINO Is Not ORM - a Python asyncio ORM on SQLAlchemy core.
https://python-gino.org/
Other
2.68k stars 150 forks source link

Rename CRUDModel attributes #722

Closed kigawas closed 4 years ago

kigawas commented 4 years ago

UpdateRequest.update collides with CRUDModel.update

Thus, we cannot redefine the update method at the bottom model level.

I recommend adding an underline to CRUDModel.create like create_, as well as update, query, etc.

fantix commented 4 years ago

Could you please provide an example to describe your use case? Are you trying to overwrite the Model.update() method?

kigawas commented 4 years ago

I'd like to overwrite the default update method sometimes - especially for some base classes.

kigawas commented 4 years ago

I misunderstood.

After closer inspection, I realized just need to overwrite _update, _delete etc.