]> 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:22:38 +0000 (20:22 -0500)
commit8ad968f33100baeb3b13c7e0b724b6b79ab4277f
tree2a4081d4cec903327ce6b3c6d374858d3218a92a
parent60a9d2da25da68466130771afc3f35c9473aca02
- 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.
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