summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/ext.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2022-09-25 16:37:15 +0200
committerMike Bayer <mike_mp@zzzcomputing.com>2022-09-25 21:16:41 -0400
commite3a71aadd7637824e5a6937118668f304460d003 (patch)
tree28cd00e286fd3419c037501b90ef5413f7916353 /lib/sqlalchemy/dialects/postgresql/ext.py
parentb9e2926d661b80ee7b7c094c92cfa272d81b0b8b (diff)
downloadsqlalchemy-e3a71aadd7637824e5a6937118668f304460d003.tar.gz
`aggregate_order_by` now supports cache generation.
also adjusted CacheKeyFixture to be a general purpose fixture so that sub-components / dialects can run their own cache key tests. Fixes: #8574 Change-Id: I6c66107856aee11e548d357cea77bceee3e316a0 (cherry picked from commit 7980b677085fc759a0406f6778b9729955f3c7f6)
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/ext.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/ext.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/ext.py b/lib/sqlalchemy/dialects/postgresql/ext.py
index 9e52ee1ee..e6b992e88 100644
--- a/lib/sqlalchemy/dialects/postgresql/ext.py
+++ b/lib/sqlalchemy/dialects/postgresql/ext.py
@@ -14,6 +14,7 @@ from ...sql import functions
from ...sql import roles
from ...sql import schema
from ...sql.schema import ColumnCollectionConstraint
+from ...sql.visitors import InternalTraversal
class aggregate_order_by(expression.ColumnElement):
@@ -54,7 +55,11 @@ class aggregate_order_by(expression.ColumnElement):
__visit_name__ = "aggregate_order_by"
stringify_dialect = "postgresql"
- inherit_cache = False
+ _traverse_internals = [
+ ("target", InternalTraversal.dp_clauseelement),
+ ("type", InternalTraversal.dp_type),
+ ("order_by", InternalTraversal.dp_clauseelement),
+ ]
def __init__(self, target, *order_by):
self.target = coercions.expect(roles.ExpressionElementRole, target)