summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql/test_compiler.py
diff options
context:
space:
mode:
authorjazzthief <mynameisyegor@gmail.com>2023-02-02 13:48:13 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2023-02-06 12:59:34 -0500
commit781ac8f0aa1ef9289e424f451353f491b09bd01f (patch)
tree9476c69b661351a2c7708103d5ec2a1b964369e9 /test/dialect/postgresql/test_compiler.py
parent0635235090c85e2c1a18676ca49652d2c2094925 (diff)
downloadsqlalchemy-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.py8
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()