From 81f99c1b143d33e275afef7472750b5174294e80 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 4 Oct 2021 11:21:35 -0400 Subject: repair any_() / all_() "implicit flip" behavior for None Fixed an inconsistency in the any_() / all_() functions / methods where the special behavior these functions have of "flipping" the expression such that the "ANY" / "ALL" expression is always on the right side would not function if the comparison were against the None value, that is, "column.any_() == None" should produce the same SQL expression as "null() == column.any_()". Added more docs to clarify this as well, plus mentions that any_() / all_() generally supersede the ARRAY version "any()" / "all()". Fixes: #7140 Change-Id: Ia5d55414ba40eb3fbda3598931fdd24c9b4a4411 --- lib/sqlalchemy/dialects/postgresql/array.py | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'lib/sqlalchemy/dialects/postgresql/array.py') diff --git a/lib/sqlalchemy/dialects/postgresql/array.py b/lib/sqlalchemy/dialects/postgresql/array.py index 3cb60d3f3..9659d31b9 100644 --- a/lib/sqlalchemy/dialects/postgresql/array.py +++ b/lib/sqlalchemy/dialects/postgresql/array.py @@ -16,13 +16,8 @@ from ...sql import roles def Any(other, arrexpr, operator=operators.eq): - """A synonym for the :meth:`.ARRAY.Comparator.any` method. - - This method is legacy and is here for backwards-compatibility. - - .. seealso:: - - :func:`_expression.any_` + """A synonym for the ARRAY-level :meth:`.ARRAY.Comparator.any` method. + See that method for details. """ @@ -30,13 +25,8 @@ def Any(other, arrexpr, operator=operators.eq): def All(other, arrexpr, operator=operators.eq): - """A synonym for the :meth:`.ARRAY.Comparator.all` method. - - This method is legacy and is here for backwards-compatibility. - - .. seealso:: - - :func:`_expression.all_` + """A synonym for the ARRAY-level :meth:`.ARRAY.Comparator.all` method. + See that method for details. """ -- cgit v1.2.1