<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/test/orm/test_bulk.py, branch pr_github_286</title>
<subtitle>github.com: zzzeek/sqlalchemy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/'/>
<entry>
<title>Add "render_nulls" flag to bulk_insert as optional performance optimization</title>
<updated>2016-06-06T20:22:11+00:00</updated>
<author>
<name>tsauerwein</name>
<email>tobias.sauerwein@camptocamp.com</email>
</author>
<published>2016-04-12T03:16:17+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=528509e1bc41c7fe4e51f7bb550db6343b29e841'/>
<id>528509e1bc41c7fe4e51f7bb550db6343b29e841</id>
<content type='text'>
Currently, ``Session.bulk_insert_mappings`` omits NULL values which
causes it to break up batches of inserts based on which batches
contain NULL and which do not.

By adding this flag, the same columns are rendered in the INSERT
for all rows allowing them to be batched.  The downside is that
server-side defaults are omitted.

Doctext-author: Mike Bayer &lt;mike_mp@zzzcomputing.com&gt;
Change-Id: Iec5969304d4bdbf57290b200331bde02254aa3a5
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/243
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, ``Session.bulk_insert_mappings`` omits NULL values which
causes it to break up batches of inserts based on which batches
contain NULL and which do not.

By adding this flag, the same columns are rendered in the INSERT
for all rows allowing them to be batched.  The downside is that
server-side defaults are omitted.

Doctext-author: Mike Bayer &lt;mike_mp@zzzcomputing.com&gt;
Change-Id: Iec5969304d4bdbf57290b200331bde02254aa3a5
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/243
</pre>
</div>
</content>
</entry>
<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://trove.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://trove.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://trove.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://trove.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://trove.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://trove.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://trove.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>
