summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/attributes.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-12-18 16:33:22 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2022-12-26 13:48:55 -0500
commit4338213935b4133e36d593ceec75f7fe36c13f66 (patch)
tree526982c75061dfe2fea8d0c0f5093a4ebdadf587 /lib/sqlalchemy/orm/attributes.py
parentce8c0013169bdbe377ca21389f85051525814264 (diff)
downloadsqlalchemy-4338213935b4133e36d593ceec75f7fe36c13f66.tar.gz
reorganize pre_session_exec around do_orm_execute
Allow do_orm_execute() events to both receive the complete state of bind_argments, load_options, update_delete_options as they do already, but also allow them to *change* all those things via new execution options. Options like autoflush, populate_existing etc. can now be updated within a do_orm_execute() hook and those changes will take effect all the way through. Took a few tries to get something that covers every case here, in particular horizontal sharding which is consuming those options as well as using context.invoke(), without excess complexity. The good news seems to be that a simple reorg and replacing the "reentrant" boolean with "is this before do_orm_execute is invoked" was all that was needed. As part of this we add a new "identity_token" option allowing this option to be controlled from do_orm_execute() as well as from the outside. WIP Fixes: #7837 Change-Id: I087728215edec8d1b1712322ab389e3f52ff76ba
Diffstat (limited to 'lib/sqlalchemy/orm/attributes.py')
0 files changed, 0 insertions, 0 deletions