diff options
author | Michael Trier <mtrier@gmail.com> | 2010-12-19 19:38:03 -0500 |
---|---|---|
committer | Michael Trier <mtrier@gmail.com> | 2010-12-19 19:38:03 -0500 |
commit | 650bbcc8fd404b2122f1f5ab10eadb4fe3837274 (patch) | |
tree | 52755cef4e4cf4274681dc385c6d96e4113dadf2 /lib/sqlalchemy/sql/compiler.py | |
parent | 15ea17d7f882fec3f892a22612da4827780c8dae (diff) | |
parent | 0a46523a92dbf5229575cd75bb1be989024676ec (diff) | |
download | sqlalchemy-650bbcc8fd404b2122f1f5ab10eadb4fe3837274.tar.gz |
merge tip
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 8bd728a7c..cf1e28f50 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -253,24 +253,16 @@ class SQLCompiler(engine.Compiled): # or dialect.max_identifier_length self.truncated_names = {} - # other memoized things - self._memos ={} - def _get_bind_processors(self, dialect): - key = 'bind_processors', dialect.__class__, \ - dialect.server_version_info - - if key not in self._memos: - self._memos[key] = processors = dict( + @util.memoized_property + def _bind_processors(self): + return dict( (key, value) for key, value in ( (self.bind_names[bindparam], - bindparam.type._cached_bind_processor(dialect)) + bindparam.type._cached_bind_processor(self.dialect)) for bindparam in self.bind_names ) if value is not None ) - return processors - else: - return self._memos[key] def is_subquery(self): return len(self.stack) > 1 |