<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/lib/sqlalchemy/sql, 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>Reduce the numbers of calls to isinstance</title>
<updated>2015-10-08T11:24:02+00:00</updated>
<author>
<name>Gorka Eguileor</name>
<email>geguileo@redhat.com</email>
</author>
<published>2015-10-08T11:24:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=44e5a31ccee5335962602327132a4196fb1c7911'/>
<id>44e5a31ccee5335962602327132a4196fb1c7911</id>
<content type='text'>
Change _process_colparams method to remove duplicate isinstance calls
and try to speed up processing of the parameters.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change _process_colparams method to remove duplicate isinstance calls
and try to speed up processing of the parameters.
</pre>
</div>
</content>
</entry>
<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>Only check once if parameters are ordered</title>
<updated>2015-10-02T16:22:33+00:00</updated>
<author>
<name>Gorka Eguileor</name>
<email>geguileo@redhat.com</email>
</author>
<published>2015-10-02T16:22:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=ef816f23290ae3b7f386832dd01e59dfb4eca7f7'/>
<id>ef816f23290ae3b7f386832dd01e59dfb4eca7f7</id>
<content type='text'>
Instead of checking multiple times if parameters are a dictionary in the
form of a tuple or list of value pairs, we check it only once and then
store it in the statement so it can be used on compilation time.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of checking multiple times if parameters are a dictionary in the
form of a tuple or list of value pairs, we check it only once and then
store it in the statement so it can be used on compilation time.
</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>- 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>- The :func:`.type_coerce` construct is now a fully fledged Core</title>
<updated>2015-09-16T22:46:53+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-09-16T22:46:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=24a7241b5ef63f8e82c007d89f5c179d9596bf10'/>
<id>24a7241b5ef63f8e82c007d89f5c179d9596bf10</id>
<content type='text'>
expression element which is late-evaluated at compile time.  Previously,
the function was only a conversion function which would handle different
expression inputs by returning either a :class:`.Label` of a column-oriented
expression or a copy of a given :class:`.BindParameter` object,
which in particular prevented the operation from being logically
maintained when an ORM-level expression transformation would convert
a column to a bound parameter (e.g. for lazy loading).
fixes #3531
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
expression element which is late-evaluated at compile time.  Previously,
the function was only a conversion function which would handle different
expression inputs by returning either a :class:`.Label` of a column-oriented
expression or a copy of a given :class:`.BindParameter` object,
which in particular prevented the operation from being logically
maintained when an ORM-level expression transformation would convert
a column to a bound parameter (e.g. for lazy loading).
fixes #3531
</pre>
</div>
</content>
</entry>
<entry>
<title>- Fixed regression in 1.0-released default-processor for multi-VALUES</title>
<updated>2015-08-31T15:30:03+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-08-31T15:30:03+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=c39ff9978dbb77cbea4f1ee08234887d8aa1b165'/>
<id>c39ff9978dbb77cbea4f1ee08234887d8aa1b165</id>
<content type='text'>
insert statement, :ticket:`3288`, where the column type for the
default-holding column would not be propagated to the compiled
statement in the case where the default was being used,
leading to bind-level type handlers not being invoked.
fixes #3520
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
insert statement, :ticket:`3288`, where the column type for the
default-holding column would not be propagated to the compiled
statement in the case where the default was being used,
leading to bind-level type handlers not being invoked.
fixes #3520
</pre>
</div>
</content>
</entry>
<entry>
<title>- The :class:`.TypeDecorator` type extender will now work in conjunction</title>
<updated>2015-08-27T22:04:25+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2015-08-27T22:04:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/sqlalchemy.git/commit/?id=ed535649d423020c816e66869016992df25e456e'/>
<id>ed535649d423020c816e66869016992df25e456e</id>
<content type='text'>
with a :class:`.SchemaType` implementation, typically :class:`.Enum`
or :class:`.Boolean` with regards to ensuring that the per-table
events are propagated from the implementation type to the outer type.
These events are used
to ensure that the constraints or Postgresql types (e.g. ENUM)
are correctly created (and possibly dropped) along with the parent
table.
fixes #2919
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
with a :class:`.SchemaType` implementation, typically :class:`.Enum`
or :class:`.Boolean` with regards to ensuring that the per-table
events are propagated from the implementation type to the outer type.
These events are used
to ensure that the constraints or Postgresql types (e.g. ENUM)
are correctly created (and possibly dropped) along with the parent
table.
fixes #2919
</pre>
</div>
</content>
</entry>
</feed>
