]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- add logic to compiler such that if stack is empty, we just
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 2 Sep 2014 14:49:46 +0000 (10:49 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 2 Sep 2014 14:49:46 +0000 (10:49 -0400)
commitc0af2ee6c992cf6574d8eea052d7cd3b0fabd337
tree200b9ee5795847754481e1eec52da24c6c6b46f8
parentb621d232519bd84321853087b5ab21b3d8ef1dd9
- add logic to compiler such that if stack is empty, we just
stringify a _label_reference() as is.
- add .key to _label_reference(), so that when _make_proxy()
is called, we don't call str() on it anyway.
- add a test to exercise Query's behavior of adding all the order_by
expressions to the columns list of the select, assert that things
work out when we have a _label_reference there, that it gets sucked
into the columns list and spit out on the other side, it's referred
to appropriately, etc.   _label_reference() could theoretically
be resolved at the point we iterate _raw_columns() but
it's better to just let things work as they already do (except
nicer, since we get "tablename.colname" instead of just "somename"
 in the columns list) so that we aren't adding a ton of overhead
to _columns_plus_names in the common case.
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/selectable.py
test/orm/test_query.py
test/sql/test_text.py