From e3a71aadd7637824e5a6937118668f304460d003 Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Sun, 25 Sep 2022 16:37:15 +0200 Subject: `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) --- lib/sqlalchemy/dialects/postgresql/ext.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/dialects/postgresql/ext.py') 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) -- cgit v1.2.1