summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/requirements.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2020-04-16 23:16:32 +0200
committerMike Bayer <mike_mp@zzzcomputing.com>2020-04-20 11:28:51 -0400
commit07d6d211f23f1d9d1d69fd54e8054bccd515bc8c (patch)
tree321a19e49f8918ec38bba96bf4c062633801bd26 /lib/sqlalchemy/testing/requirements.py
parent2f617f56f2acdce00b88f746c403cf5ed66d4d27 (diff)
downloadsqlalchemy-07d6d211f23f1d9d1d69fd54e8054bccd515bc8c.tar.gz
Deprecate ``DISTINCT ON`` when not targeting PostgreSQL
Deprecate usage of ``DISTINCT ON`` in dialect other than PostgreSQL. Previously this was silently ignored. Deprecate old usage of string distinct in MySQL dialect Fixes: #4002 Change-Id: I38fc64aef75e77748083c11d388ec831f161c9c9
Diffstat (limited to 'lib/sqlalchemy/testing/requirements.py')
-rw-r--r--lib/sqlalchemy/testing/requirements.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py
index 644483b79..31011a970 100644
--- a/lib/sqlalchemy/testing/requirements.py
+++ b/lib/sqlalchemy/testing/requirements.py
@@ -1170,6 +1170,11 @@ class SuiteRequirements(Requirements):
return exclusions.closed()
@property
+ def supports_distinct_on(self):
+ """If a backend supports the DISTINCT ON in a select"""
+ return exclusions.closed()
+
+ @property
def supports_is_distinct_from(self):
"""Supports some form of "x IS [NOT] DISTINCT FROM y" construct.
Different dialects will implement their own flavour, e.g.,