]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Convert bulk update/delete to new execution model
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 3 Jun 2020 21:38:35 +0000 (17:38 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 6 Jun 2020 17:31:54 +0000 (13:31 -0400)
commit3ab2364e78641c4f0e4b6456afc2cbed39b0d0e6
treef3dc26609070c1a357a366592c791a3ec0655483
parent14bc09203a8b5b2bc001f764ad7cce6a184975cc
Convert bulk update/delete to new execution model

This reorganizes the BulkUD model in sqlalchemy.orm.persistence
to be based on the CompileState concept and to allow plain
update() / delete() to be passed to session.execute() where
the ORM synchronize session logic will take place.
Also gets "synchronize_session='fetch'" working with horizontal
sharding.

Adding a few more result.scalar_one() types of methods
as scalar_one() seems like what is normally desired.

Fixes: #5160
Change-Id: I8001ebdad089da34119eb459709731ba6c0ba975
31 files changed:
lib/sqlalchemy/engine/cursor.py
lib/sqlalchemy/engine/result.py
lib/sqlalchemy/ext/horizontal_shard.py
lib/sqlalchemy/ext/hybrid.py
lib/sqlalchemy/orm/context.py
lib/sqlalchemy/orm/descriptor_props.py
lib/sqlalchemy/orm/events.py
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/persistence.py
lib/sqlalchemy/orm/query.py
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/sql/base.py
lib/sqlalchemy/sql/coercions.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/dml.py
lib/sqlalchemy/sql/roles.py
lib/sqlalchemy/sql/selectable.py
lib/sqlalchemy/sql/traversals.py
lib/sqlalchemy/testing/assertions.py
lib/sqlalchemy/util/__init__.py
lib/sqlalchemy/util/compat.py
test/aaa_profiling/test_orm.py
test/base/test_result.py
test/ext/test_horizontal_shard.py
test/ext/test_hybrid.py
test/orm/test_composites.py
test/orm/test_core_compilation.py
test/orm/test_deprecations.py
test/orm/test_events.py
test/orm/test_update_delete.py
test/sql/test_compare.py