diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-03-08 11:29:10 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-03-08 11:34:14 -0400 |
commit | 9854114f578833aee49b65e440319a0ec26daab6 (patch) | |
tree | b0e6c9561f388e92480f04a2229513db6363096c /lib/sqlalchemy/sql/compiler.py | |
parent | 17b2fd3fba8eef5bdd4040f2d71c75e4aeb4e215 (diff) | |
download | sqlalchemy-9854114f578833aee49b65e440319a0ec26daab6.tar.gz |
foo
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index e37fa646c..a3a247ac0 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -393,22 +393,6 @@ class SQLCompiler(Compiled): if self.positional and dialect.paramstyle == 'numeric': self._apply_numbered_params() - @property - def result_map(self): - d = {} - for elem in self._result_columns: - key, rec = elem[0], elem[1:] - if key in d: - # conflicting keyname, just double up the list - # of objects. this will cause an "ambiguous name" - # error if an attempt is made by the result set to - # access. - e_name, e_obj, e_type = d[key] - d[key] = e_name, e_obj + rec[1], e_type - else: - d[key] = rec - return d - @util.memoized_instancemethod def _init_cte_state(self): """Initialize collections related to CTEs only if @@ -501,6 +485,11 @@ class SQLCompiler(Compiled): compiled object, for those values that are present.""" return self.construct_params(_check=False) + @util.dependencies("sqlalchemy.engine.result") + def _create_result_map(self, result): + """utility method used for unit tests only.""" + return result.ResultMetaData._create_result_map(self._result_columns) + def default_from(self): """Called when a SELECT statement has no froms, and no FROM clause is to be appended. |