Opened 10 years ago
Last modified 10 years ago
#22802 closed Cleanup/optimization
update Atomic class to make use of public transaction module-level API functions — at Initial Version
Reported by: | Gary Wilson | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.6 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
Currently, the class operates using the connection object directly; however, this makes it more difficult for libraries that need to customize transaction management, e.g. https://github.com/jmoiron/johnny-cache (see also https://github.com/jmoiron/johnny-cache/issues/40).
Ideally, I believe that wrapping the entire transaction API into a class and making it configurable would even better, as it would allow for transaction management customization without monkey patching. That said, I propose we at least make use of the public API functions for the 1.7 release, as that makes the transactions interface backwards-compatible with versions before the Atomic class landed.