<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/lib/sqlalchemy/orm, branch pr/200</title>
<subtitle>github.com: zzzeek/sqlalchemy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/'/>
<entry>
<title>Remove dict comprehension for py26 compatibility</title>
<updated>2015-10-05T08:42:09+00:00</updated>
<author>
<name>Gorka Eguileor</name>
<email>geguileo@redhat.com</email>
</author>
<published>2015-10-05T08:42:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=c6ba1a7d4c2b1c081cfff39b3455d1684ec147be'/>
<id>c6ba1a7d4c2b1c081cfff39b3455d1684ec147be</id>
<content type='text'>
Remove added dict comprehensions that make this patch set non python 2.6
compatible.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove added dict comprehensions that make this patch set non python 2.6
compatible.
</pre>
</div>
</content>
</entry>
<entry>
<title>Postpone parameters change in ordered updates</title>
<updated>2015-09-30T16:45:05+00:00</updated>
<author>
<name>Gorka Eguileor</name>
<email>geguileo@redhat.com</email>
</author>
<published>2015-09-30T16:45:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=ddb43cebf68b9e6194a1a22b7630e143d2a79c00'/>
<id>ddb43cebf68b9e6194a1a22b7630e143d2a79c00</id>
<content type='text'>
Postpone as much as possible the change of update parameters to
OrderedDict from list or tuple of pairs.

This way we won't have problems with query's update method.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Postpone as much as possible the change of update parameters to
OrderedDict from list or tuple of pairs.

This way we won't have problems with query's update method.
</pre>
</div>
</content>
</entry>
<entry>
<title>Only preserve order in updates if tuple/dict</title>
<updated>2015-09-29T18:29:33+00:00</updated>
<author>
<name>Gorka Eguileor</name>
<email>geguileo@redhat.com</email>
</author>
<published>2015-09-29T18:29:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=9fb76d759678558f6fd087dcc04de3f2daa3a571'/>
<id>9fb76d759678558f6fd087dcc04de3f2daa3a571</id>
<content type='text'>
To avoid penalties for updates that do not require ordering, we will
only use OrderedDict for updates that receive a tuple or list of pairs,
and all kinds of dictionaries (dict, sqlalchemy's OrderedDict, or
collections.OrderedDict) will be treateated as unordered updates, just
like we were doing before.

This way this new feature will not change how updates behave for any
existing code and will only affect those that use the new ordered
feature.

This patch reverts update tests to how they were before as well as adds
a couple of tests to confirm that OrderedDicts are really treated like
normal dicts.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To avoid penalties for updates that do not require ordering, we will
only use OrderedDict for updates that receive a tuple or list of pairs,
and all kinds of dictionaries (dict, sqlalchemy's OrderedDict, or
collections.OrderedDict) will be treateated as unordered updates, just
like we were doing before.

This way this new feature will not change how updates behave for any
existing code and will only affect those that use the new ordered
feature.

This patch reverts update tests to how they were before as well as adds
a couple of tests to confirm that OrderedDicts are really treated like
normal dicts.
</pre>
</div>
</content>
</entry>
<entry>
<title>Preserve order in update method</title>
<updated>2015-09-24T13:35:13+00:00</updated>
<author>
<name>Gorka Eguileor</name>
<email>geguileo@redhat.com</email>
</author>
<published>2015-09-24T13:07:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=fc73036865a0c0d2809b66fcfdc663ff425f4267'/>
<id>fc73036865a0c0d2809b66fcfdc663ff425f4267</id>
<content type='text'>
In some DBs the UPDATE operation is order dependent, so the operation
behaves differently depending on the order of the values.

As an example, imagine a volumes table with columns 'status' and
'previous_status' and we want to update a volume that has 'available' in
the status column.

If the SQL query is performed as:

 UPDATE volumes SET previous_status=status, status='new' WHERE id=1;

This will result in a volume with 'new' status and 'available'
previous_status both on SQLite and MariaDB, but if we reverse the
columns:

 UPDATE volumes SET status='new', previous_status=status WHERE id=1;

We will get the same result in SQLite but will result in a volume with
status and previous_status set to 'new' in MariaDB, which is not what we
want.

So order must be taken into consideration in some cases and it should be
allowed to ve specified via the Query update method or the values method
of an update.

This patch fixes this issue by preserving the order of parameters in
updates and allowing to receive not only dictionaries in update and
values but also ordered dictionaries and list/tuples of value pairs
(like dict and OrderedDict do).

fixes #3541
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some DBs the UPDATE operation is order dependent, so the operation
behaves differently depending on the order of the values.

As an example, imagine a volumes table with columns 'status' and
'previous_status' and we want to update a volume that has 'available' in
the status column.

If the SQL query is performed as:

 UPDATE volumes SET previous_status=status, status='new' WHERE id=1;

This will result in a volume with 'new' status and 'available'
previous_status both on SQLite and MariaDB, but if we reverse the
columns:

 UPDATE volumes SET status='new', previous_status=status WHERE id=1;

We will get the same result in SQLite but will result in a volume with
status and previous_status set to 'new' in MariaDB, which is not what we
want.

So order must be taken into consideration in some cases and it should be
allowed to ve specified via the Query update method or the values method
of an update.

This patch fixes this issue by preserving the order of parameters in
updates and allowing to receive not only dictionaries in update and
values but also ordered dictionaries and list/tuples of value pairs
(like dict and OrderedDict do).

fixes #3541
</pre>
</div>
</content>
</entry>
<entry>
<title>- Fixed rare TypeError which could occur when stringifying certain</title>
<updated>2015-09-23T20:40:16+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-09-23T20:40:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=47fcb1d0b6ad6481e89d4b2e8c2cc29cf7c03d8b'/>
<id>47fcb1d0b6ad6481e89d4b2e8c2cc29cf7c03d8b</id>
<content type='text'>
kinds of internal column loader options within internal logging.
fixes #3539
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
kinds of internal column loader options within internal logging.
fixes #3539
</pre>
</div>
</content>
</entry>
<entry>
<title>- Added a new type-level modifier :meth:`.TypeEngine.evaluates_none`</title>
<updated>2015-09-19T20:27:51+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-09-19T17:12:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=80aeba3d5e0269eb689d991ca0b8e281715113ed'/>
<id>80aeba3d5e0269eb689d991ca0b8e281715113ed</id>
<content type='text'>
which indicates to the ORM that a positive set of None should be
persisted as the value NULL, instead of omitting the column from
the INSERT statement.  This feature is used both as part of the
implementation for :ticket:`3514` as well as a standalone feature
available on any type.  fixes #3250
- add new documentation section illustrating the "how to force null"
 use case of #3250
- alter our change from #3514 so that the class-level flag is now
called "should_evaluate_none"; so that "evaluates_none" is now
a generative method.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
which indicates to the ORM that a positive set of None should be
persisted as the value NULL, instead of omitting the column from
the INSERT statement.  This feature is used both as part of the
implementation for :ticket:`3514` as well as a standalone feature
available on any type.  fixes #3250
- add new documentation section illustrating the "how to force null"
 use case of #3250
- alter our change from #3514 so that the class-level flag is now
called "should_evaluate_none"; so that "evaluates_none" is now
a generative method.
</pre>
</div>
</content>
</entry>
<entry>
<title>- add a new FAQ recipe for "walk all objects", replacing the need</title>
<updated>2015-09-10T14:00:46+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-09-10T14:00:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=03797b78475bec9fb9c15f8e926414f3720a273c'/>
<id>03797b78475bec9fb9c15f8e926414f3720a273c</id>
<content type='text'>
to use mapper.cascade_iterator() for this purpose as it was not really
designed for that use case.  Add docs to cascade_iterator() pointing
to the recipe.  fixes #3498
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to use mapper.cascade_iterator() for this purpose as it was not really
designed for that use case.  Add docs to cascade_iterator() pointing
to the recipe.  fixes #3498
</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://91.123.203.49/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://91.123.203.49/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>- reduce some callcounts within the new events</title>
<updated>2015-09-03T15:11:25+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-09-03T15:11:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=7699bd733bc109e1c39f764684c88dbaed63fe4a'/>
<id>7699bd733bc109e1c39f764684c88dbaed63fe4a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
