diff options
author | jazzthief <mynameisyegor@gmail.com> | 2023-02-02 13:48:13 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2023-02-06 12:59:34 -0500 |
commit | 781ac8f0aa1ef9289e424f451353f491b09bd01f (patch) | |
tree | 9476c69b661351a2c7708103d5ec2a1b964369e9 /test/dialect/postgresql/test_compiler.py | |
parent | 0635235090c85e2c1a18676ca49652d2c2094925 (diff) | |
download | sqlalchemy-781ac8f0aa1ef9289e424f451353f491b09bd01f.tar.gz |
Dedicated bitwise operators
Added a full suite of new SQL bitwise operators, for performing
database-side bitwise expressions on appropriate data values such as
integers, bit-strings, and similar. Pull request courtesy Yegor Statkevich.
Fixes: #8780
Closes: #9204
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9204
Pull-request-sha: a4541772a6a784f9161ad78ef84d2ea7a62fa8de
Change-Id: I4c70e80f9548dcc1b4e3dccd71bd59d51d3ed46e
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
-rw-r--r-- | test/dialect/postgresql/test_compiler.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_compiler.py b/test/dialect/postgresql/test_compiler.py index 57b147c90..080cfb767 100644 --- a/test/dialect/postgresql/test_compiler.py +++ b/test/dialect/postgresql/test_compiler.py @@ -2424,6 +2424,14 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): "WHERE usages.date <@ %(date_1)s::DATERANGE", ) + def test_bitwise_xor(self): + c1 = column("c1", Integer) + c2 = column("c2", Integer) + self.assert_compile( + select(c1.bitwise_xor(c2)), + "SELECT c1 # c2 AS anon_1", + ) + class InsertOnConflictTest(fixtures.TablesTest, AssertsCompiledSQL): __dialect__ = postgresql.dialect() |