diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-12-19 16:01:40 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-12-19 16:01:40 -0500 |
commit | 3687d7ab56841700fb087c8f0ddf0e3912e05cfd (patch) | |
tree | 296ecbad49f92f49174caaf2ec842196595a87a2 /lib/sqlalchemy/sql/compiler.py | |
parent | a590e5db8aece17e93371bca290d2e205528e34c (diff) | |
download | sqlalchemy-3687d7ab56841700fb087c8f0ddf0e3912e05cfd.tar.gz |
- duh, compiled is per dialect
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 0c76f3e74..4c1fefa55 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -251,24 +251,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 |