<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/test/orm/test_bulk.py, branch pr/264</title>
<subtitle>github.com: zzzeek/sqlalchemy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/'/>
<entry>
<title>- Internal calls to "bookkeeping" functions within</title>
<updated>2015-09-08T18:12:32+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-09-08T18:12:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=0997e843f2cd81a7ddbfcc73d7f87a8061139976'/>
<id>0997e843f2cd81a7ddbfcc73d7f87a8061139976</id>
<content type='text'>
:meth:`.Session.bulk_save_objects` and related bulk methods have
been scaled back to the extent that this functionality is not
currently used, e.g. checks for column default values to be
fetched after an INSERT or UPDATE statement.
fixes #3526
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
:meth:`.Session.bulk_save_objects` and related bulk methods have
been scaled back to the extent that this functionality is not
currently used, e.g. checks for column default values to be
fetched after an INSERT or UPDATE statement.
fixes #3526
</pre>
</div>
</content>
</entry>
<entry>
<title>- Fixed bug in :meth:`.Session.bulk_save_objects` where a mapped</title>
<updated>2015-09-08T17:00:26+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-09-08T17:00:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=68a6701c6d72d6c6ef1ea2b7d615273659e8b735'/>
<id>68a6701c6d72d6c6ef1ea2b7d615273659e8b735</id>
<content type='text'>
column that had some kind of "fetch on update" value and was not
locally present in the given object would cause an AttributeError
within the operation.
fixes #3525
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
column that had some kind of "fetch on update" value and was not
locally present in the given object would cause an AttributeError
within the operation.
fixes #3525
</pre>
</div>
</content>
</entry>
<entry>
<title>- add changelog for #3451, with 09485d733131b667813f44eb0b6807b698668ee7 fixes #3451</title>
<updated>2015-06-14T00:15:17+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-06-14T00:15:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=2497d559ddeb68e52eb1838deeed7e3305280aa5'/>
<id>2497d559ddeb68e52eb1838deeed7e3305280aa5</id>
<content type='text'>
- also add a bulk_insert_mappings test
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- also add a bulk_insert_mappings test
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix primary key behaviour in bulk_update</title>
<updated>2015-06-13T18:11:16+00:00</updated>
<author>
<name>Patrick Hayes</name>
<email>pfhayes@gmail.com</email>
</author>
<published>2015-06-13T18:11:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=09485d733131b667813f44eb0b6807b698668ee7'/>
<id>09485d733131b667813f44eb0b6807b698668ee7</id>
<content type='text'>
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```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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```
</pre>
</div>
</content>
</entry>
<entry>
<title>- add an option for bulk_save -&gt; update to not do history</title>
<updated>2014-12-08T01:36:01+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-12-08T01:36:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=07cc9e054ae4d5bb9cfc3c1d807b2a0d58a95b69'/>
<id>07cc9e054ae4d5bb9cfc3c1d807b2a0d58a95b69</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>- fix inheritance persistence</title>
<updated>2014-12-08T01:21:20+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-12-08T01:21:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=c42b8f8eb8f4c324e2469bf3baaa316c214abce5'/>
<id>c42b8f8eb8f4c324e2469bf3baaa316c214abce5</id>
<content type='text'>
- start writing docs
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- start writing docs
</pre>
</div>
</content>
</entry>
<entry>
<title>- initial tests for bulk</title>
<updated>2014-12-08T00:08:16+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2014-12-07T23:55:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=e257ca6c5268517ec2e9a561372d82dfc10475e8'/>
<id>e257ca6c5268517ec2e9a561372d82dfc10475e8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
