]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
open up window functions (ha ha) for mysql / mariadb
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 24 Mar 2021 16:00:16 +0000 (12:00 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 24 Mar 2021 16:02:33 +0000 (12:02 -0400)
MySQL 8 and MariaDB 10.2 support window functions so this
should be turned on.

Change-Id: Ic1fdd328f1f0def7dfc8451385c16ea81902074c

lib/sqlalchemy/sql/elements.py
test/requirements.py

index b3b0413856d725b09ac518078693c9088de59231..20c3e899114467b2f2054ad207b14d5612331f55 100644 (file)
@@ -3777,8 +3777,7 @@ class Over(ColumnElement):
     This is a special operator against a so-called
     "window" function, as well as any aggregate function,
     which produces results relative to the result set
-    itself.  It's supported only by certain database
-    backends.
+    itself.  Most modern SQL backends now support window functions.
 
     """
 
index 33f5e7fd0612436daaf4ef21e11bf1d5557ac3c8..21e009188e65baa5f26ad0c55774866cbb537692 100644 (file)
@@ -751,7 +751,14 @@ class DefaultRequirements(SuiteRequirements):
     @property
     def window_functions(self):
         return only_if(
-            ["postgresql>=8.4", "mssql", "oracle", "sqlite>=3.25.0"],
+            [
+                "postgresql>=8.4",
+                "mssql",
+                "oracle",
+                "sqlite>=3.25.0",
+                "mysql>=8",
+                "mariadb>=10.2",
+            ],
             "Backend does not support window functions",
         )