diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-06-23 08:50:48 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-06-23 09:49:11 -0400 |
commit | cdd041ea60628b2f4fd7f7da562aa19bdb15c206 (patch) | |
tree | 9f21a38990ec736a2d76d3df5dd4fab265326879 /lib/sqlalchemy/sql/compiler.py | |
parent | 2f875a4b7925742b53dd8cfda1476f7f30a18f5d (diff) | |
download | sqlalchemy-cdd041ea60628b2f4fd7f7da562aa19bdb15c206.tar.gz |
consider "*" col as textual ordered
Fixed old issue where a :func:`_sql.select()` made against the token "*",
which then yielded exactly one column, would fail to correctly organize the
``cursor.description`` column name into the keys of the result object.
Fixes: #6665
Change-Id: Ie8c00f62998972ad4a19a750d2642d00fde006f6
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index f47ea8f33..8ae56fd54 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -2805,7 +2805,7 @@ class SQLCompiler(Compiled): return " AS " + alias_name_text def _add_to_result_map(self, keyname, name, objects, type_): - if keyname is None: + if keyname is None or keyname == "*": self._ordered_columns = False self._textual_ordered_columns = True if type_._is_tuple_type: |