]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- reworked the way the "select_wraps_for" expression is
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 21 Feb 2016 01:22:38 +0000 (20:22 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 21 Feb 2016 01:30:58 +0000 (20:30 -0500)
commitcf818984ab52d824dbf77fcb6f18ec4efca53704
tree3e34d65cf18853b3771c9e8f3ddee6cc120af42f
parenta1c1ce7f769fe0e6cef42fe2aec1bb8033620cbc
- reworked the way the "select_wraps_for" expression is
handled within visit_select(); this attribute was added in the
1.0 series to accommodate the subquery wrapping behavior of
SQL Server and Oracle while also working with positional
column targeting and no longer relying upon "key fallback"
in order to target columns in such a statement.  The IBM DB2
third-party dialect also has this use case, but its implementation
is using regular expressions to rewrite the textual SELECT only
and does not make use of a "wrapped" select at this time.
The logic no longer attempts to reconcile proxy set collections as
this was not deterministic, and instead assumes that the select()
and the wrapper select() match their columns postionally,
at least for the column positions they have in common,
so it is now very simple and safe.  fixes #3657.
- as a side effect of #3657 it was also revealed that the
strategy of calling upon a ResultProxy._getter was not
correctly calling into NoSuchColumnError when an expected
column was not present, and instead returned None up to
loading.instances() to produce NoneType failures; added
a raiseerr argument to _getter() which is called when we
aren't expecting None, fixes #3658.

(cherry picked from commit 8ad968f33100baeb3b13c7e0b724b6b79ab4277f)
doc/build/changelog/changelog_10.rst
lib/sqlalchemy/engine/result.py
lib/sqlalchemy/orm/loading.py
lib/sqlalchemy/orm/strategies.py
lib/sqlalchemy/sql/compiler.py
test/dialect/mssql/test_compiler.py
test/orm/test_loading.py
test/sql/test_compiler.py
test/sql/test_resultset.py