[Sqlalchemy-commits] commit/sqlalchemy: 3 new changesets
Brought to you by:
zzzeek
From: Bitbucket <com...@bi...> - 2015-06-14 00:43:49
|
3 new commits in sqlalchemy: https://bitbucket.org/zzzeek/sqlalchemy/commits/09485d733131/ Changeset: 09485d733131 Branch: None User: Patrick Hayes Date: 2015-06-13 18:11:16+00:00 Summary: Fix primary key behaviour in bulk_update Suppose you have a model class with a primary key. Base = declarative_base() class User(Base): id = Column(BigInteger, primary_key=True) name = Column(String) Previously, running `bulk_update_mappings(User, {'id': 1, 'name': 'hello'})` would emit the following: ```UPDATE users SET id=1, name='hello' WHERE id=1``` This is contrary to the stated behaviour, where primary keys are omitted from the SET clause. Furthermore, this behaviour is harmful, as it can cause the db engine to lock over-aggresively (at least in Postgres). With this change, the emitted SQL is: ```UPDATE users SET name='hello' WHERE id=1``` Affected #: 2 files https://bitbucket.org/zzzeek/sqlalchemy/commits/2497d559ddeb/ Changeset: 2497d559ddeb Branch: None User: zzzeek Date: 2015-06-14 00:15:17+00:00 Summary: - add changelog for #3451, with 09485d733131b667813f44eb0b6807b698668ee7 fixes #3451 - also add a bulk_insert_mappings test Affected #: 3 files https://bitbucket.org/zzzeek/sqlalchemy/commits/bcbfcca2360a/ Changeset: bcbfcca2360a Branch: None User: zzzeek Date: 2015-06-14 00:27:06+00:00 Summary: - restore the approach we have for pk_params, but in order to suit #3451 exclude these columns from the "params" dictionary in the first place, revises pr github:181 Affected #: 1 file Repository URL: https://bitbucket.org/zzzeek/sqlalchemy/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |