diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2020-08-14 00:08:29 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@bbpush.zzzcomputing.com> | 2020-08-14 00:08:29 +0000 |
| commit | 9ccf4a2f659d77c7f1aacaa4ff2b3b16889fea5e (patch) | |
| tree | c30594326d1fb4b70b239c0865f1b7e627e63cc3 /lib/sqlalchemy/dialects/postgresql/base.py | |
| parent | b1c3c40e54bafe686065827d5b8d92c35bc50648 (diff) | |
| parent | 5fb0138a3220161703e6ab1087319a669d14e7f4 (diff) | |
| download | sqlalchemy-9ccf4a2f659d77c7f1aacaa4ff2b3b16889fea5e.tar.gz | |
Merge "Implement rudimentary asyncio support w/ asyncpg"
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
| -rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 3bd7e62d5..7717a2526 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -1299,6 +1299,14 @@ class UUID(sqltypes.TypeEngine): """ self.as_uuid = as_uuid + def coerce_compared_value(self, op, value): + """See :meth:`.TypeEngine.coerce_compared_value` for a description.""" + + if isinstance(value, util.string_types): + return self + else: + return super(UUID, self).coerce_compared_value(op, value) + def bind_processor(self, dialect): if self.as_uuid: |
