From 9854114f578833aee49b65e440319a0ec26daab6 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 8 Mar 2015 11:29:10 -0400 Subject: foo --- lib/sqlalchemy/sql/compiler.py | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'lib/sqlalchemy/sql/compiler.py') 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. -- cgit v1.2.1