diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-10-24 15:37:06 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-10-24 15:37:06 -0400 |
commit | 07d7c4905d65b7f28c1ffcbd33f81ee52c9fd847 (patch) | |
tree | a9c1213e4db2f905d65ae5cef2eed101560fe9be /lib/sqlalchemy/sql/compiler.py | |
parent | e656bf4f47cf3c06975c6207ea6e54131b292bf7 (diff) | |
download | sqlalchemy-07d7c4905d65b7f28c1ffcbd33f81ee52c9fd847.tar.gz |
Fixed bug where keyword arguments passed to
:meth:`.Compiler.process` wouldn't get propagated
to the column expressions present in the columns
clause of a SELECT statement. In particular this would
come up when used by custom compilation schemes that
relied upon special flags. [ticket:2593]
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 6da51c31c..0847335c2 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -1044,9 +1044,12 @@ class SQLCompiler(engine.Compiled): else: result_expr = col_expr + column_clause_args.update( + within_columns_clause=within_columns_clause, + add_to_result_map=add_to_result_map + ) return result_expr._compiler_dispatch( - self, within_columns_clause=within_columns_clause, - add_to_result_map=add_to_result_map, + self, **column_clause_args ) @@ -1098,7 +1101,12 @@ class SQLCompiler(engine.Compiled): self.stack.append({'from': correlate_froms, 'iswrapper': iswrapper}) - column_clause_args = {'positional_names': positional_names} + column_clause_args = kwargs.copy() + column_clause_args.update({ + 'positional_names': positional_names, + 'within_label_clause': False, + 'within_columns_clause': False + }) # the actual list of columns to print in the SELECT column list. inner_columns = [ |