]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Cleanup with query aliasing
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 18 Jan 2019 04:38:40 +0000 (23:38 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 19 Jan 2019 02:48:20 +0000 (21:48 -0500)
commit1c56b6049a3fdd1122a4c82ae5757332d3753146
tree2a6f9f5530e78409bd44d5d7175ed0fcff3190fe
parent265644072e5ae4cd0aadf94e5e6ca060f8d8c66f
Cleanup with query aliasing

Try to simplify some of the "adapter" stuff in query:

1. identify that join(.., aliased=True) doesn't work if the
right side has no mapper.   The adaption of the right side is
done via the mapper with aliased(), so that doesn't effect
a selectable only.  raise an error, so we can simplify
the code.

2. build fewer adapter objects.   these are confusing to follow
and we should try to figure out exactly what purpose which
one serves where and make that clear.

Change-Id: I18dfcd01e6ad533aa0b8d557fc637ee2766ed050
lib/sqlalchemy/orm/query.py
lib/sqlalchemy/orm/util.py
lib/sqlalchemy/sql/util.py
test/orm/test_froms.py
test/orm/test_joins.py