diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-04-22 10:57:00 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-04-22 12:53:27 -0400 |
| commit | eb7061ea7d133eb3154a825595ef31df47f1ced2 (patch) | |
| tree | d8ee56f541ad6ecfd28677ef012f0984a30c238b /test/sql | |
| parent | f1a409ecdd5f0377b9c00a859ab14e9005e873da (diff) | |
| download | sqlalchemy-eb7061ea7d133eb3154a825595ef31df47f1ced2.tar.gz | |
properly type array element in any() / all()
Fixed bug in :class:`.ARRAY` datatype in combination with :class:`.Enum` on
PostgreSQL where using the ``.any()`` method to render SQL ANY(), given
members of the Python enumeration as arguments, would produce a type
adaptation failure on all drivers.
Fixes: #6515
Change-Id: Ia1e3b4e10aaf264ed436ce6030d105fc60023433
(cherry picked from commit d023c8e1c7ad82fb249fab5155eb83dee17a160c)
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/test_operators.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/sql/test_operators.py b/test/sql/test_operators.py index 4eff872f4..c524b0aea 100644 --- a/test/sql/test_operators.py +++ b/test/sql/test_operators.py @@ -3544,8 +3544,8 @@ class AnyAllTest(fixtures.TestBase, testing.AssertsCompiledSQL): self.assert_compile( t.c.arrval.any(5, operator.gt), - ":param_1 > ANY (tab1.arrval)", - checkparams={"param_1": 5}, + ":arrval_1 > ANY (tab1.arrval)", + checkparams={"arrval_1": 5}, ) def test_any_array_comparator_negate_accessor(self, t_fixture): @@ -3553,8 +3553,8 @@ class AnyAllTest(fixtures.TestBase, testing.AssertsCompiledSQL): self.assert_compile( ~t.c.arrval.any(5, operator.gt), - "NOT (:param_1 > ANY (tab1.arrval))", - checkparams={"param_1": 5}, + "NOT (:arrval_1 > ANY (tab1.arrval))", + checkparams={"arrval_1": 5}, ) def test_all_array_comparator_accessor(self, t_fixture): @@ -3562,8 +3562,8 @@ class AnyAllTest(fixtures.TestBase, testing.AssertsCompiledSQL): self.assert_compile( t.c.arrval.all(5, operator.gt), - ":param_1 > ALL (tab1.arrval)", - checkparams={"param_1": 5}, + ":arrval_1 > ALL (tab1.arrval)", + checkparams={"arrval_1": 5}, ) def test_all_array_comparator_negate_accessor(self, t_fixture): @@ -3571,8 +3571,8 @@ class AnyAllTest(fixtures.TestBase, testing.AssertsCompiledSQL): self.assert_compile( ~t.c.arrval.all(5, operator.gt), - "NOT (:param_1 > ALL (tab1.arrval))", - checkparams={"param_1": 5}, + "NOT (:arrval_1 > ALL (tab1.arrval))", + checkparams={"arrval_1": 5}, ) def test_any_array_expression(self, t_fixture): |
