diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-08-22 18:41:46 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-08-22 18:41:46 -0400 |
| commit | 8f5a31441aed9d223e67d211472445e574fc521f (patch) | |
| tree | 5f95780d99cf6c77ffd569d34d709514fa98263c /lib/sqlalchemy/dialects | |
| parent | 477dd0f774f1c2f2f3873924ac0606bf499e0061 (diff) | |
| download | sqlalchemy-8f5a31441aed9d223e67d211472445e574fc521f.tar.gz | |
- [bug] Fixed cextension bug whereby the
"ambiguous column error" would fail to
function properly if the given index were
a Column object and not a string.
Note there are still some column-targeting
issues here which are fixed in 0.8.
[ticket:2553]
- find more cases where column targeting is being inaccurate, add
more information to result_map to better differentiate "ambiguous"
results from "present" or "not present". In particular, result_map
is sensitive to dupes, even though no error is raised; the conflicting
columns are added to the "obj" member of the tuple so that the two
are both directly accessible in the result proxy
- handwringing over the damn "name fallback" thing in results. can't
really make it perfect yet
- fix up oracle returning clause. not sure why its guarding against
labels, remove that for now and see what the bot says.
Diffstat (limited to 'lib/sqlalchemy/dialects')
| -rw-r--r-- | lib/sqlalchemy/dialects/mssql/base.py | 14 | ||||
| -rw-r--r-- | lib/sqlalchemy/dialects/oracle/base.py | 8 |
2 files changed, 12 insertions, 10 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py index 0dd610788..bccd585d0 100644 --- a/lib/sqlalchemy/dialects/mssql/base.py +++ b/lib/sqlalchemy/dialects/mssql/base.py @@ -859,15 +859,15 @@ class MSSQLCompiler(compiler.SQLCompiler): t, column) if add_to_result_map is not None: - self.result_map[column.name - if self.dialect.case_sensitive - else column.name.lower()] = \ - (column.name, (column, ) + add_to_result_map, - column.type) + add_to_result_map( + column.name, + column.name, + (column, ), + column.type + ) return super(MSSQLCompiler, self).\ - visit_column(converted, - result_map=None, **kwargs) + visit_column(converted, **kwargs) return super(MSSQLCompiler, self).visit_column( column, add_to_result_map=add_to_result_map, **kwargs) diff --git a/lib/sqlalchemy/dialects/oracle/base.py b/lib/sqlalchemy/dialects/oracle/base.py index 88bc15bcc..eb1d75caa 100644 --- a/lib/sqlalchemy/dialects/oracle/base.py +++ b/lib/sqlalchemy/dialects/oracle/base.py @@ -508,12 +508,14 @@ class OracleCompiler(compiler.SQLCompiler): columnlist = list(expression._select_iterables(returning_cols)) - # within_columns_clause =False so that labels (foo AS bar) don't render - columns = [self.process(c, within_columns_clause=False, result_map=self.result_map) for c in columnlist] + columns = [ + self._label_select_column(None, c, True, False, {}) + for c in columnlist + ] binds = [create_out_param(c, i) for i, c in enumerate(columnlist)] - return 'RETURNING ' + ', '.join(columns) + " INTO " + ", ".join(binds) + return 'RETURNING ' + ', '.join(columns) + " INTO " + ", ".join(binds) def _TODO_visit_compound_select(self, select): """Need to determine how to get ``LIMIT``/``OFFSET`` into a ``UNION`` for Oracle.""" |
