diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-11-01 23:28:44 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-11-01 23:28:44 +0000 |
| commit | 9b8292ec6afa79ea76b07a59a2e3aef1b2edb176 (patch) | |
| tree | 7c5b1c803721c4091c9c600b22ab4d168f7e2d68 /lib/sqlalchemy | |
| parent | e8854fe945e94d0fe654e83397c47f8b0fb1f1e8 (diff) | |
| download | sqlalchemy-9b8292ec6afa79ea76b07a59a2e3aef1b2edb176.tar.gz | |
fix adapt() so that DB-specified typedecorator replacements work
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/types.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqlalchemy/types.py b/lib/sqlalchemy/types.py index 92ff274f8..c60f214f9 100644 --- a/lib/sqlalchemy/types.py +++ b/lib/sqlalchemy/types.py @@ -224,7 +224,10 @@ class TypeDecorator(AbstractType): raise AssertionError("TypeDecorator implementations require a class-level " "variable 'impl' which refers to the class of type being decorated") self.impl = self.__class__.impl(*args, **kwargs) - + + def adapt(self, cls): + return cls() + def dialect_impl(self, dialect): try: return self._impl_dict[dialect.__class__] |
