mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-06-21 16:11:57 -04:00
Merge "Postgresql default to no backslash escaping" into main
This commit is contained in:
@@ -3219,14 +3219,14 @@ class LikeTest(fixtures.TestBase, testing.AssertsCompiledSQL):
|
||||
def test_like_7(self):
|
||||
self.assert_compile(
|
||||
self.table1.c.myid.ilike("somstr", escape="\\"),
|
||||
"mytable.myid ILIKE %(myid_1)s::VARCHAR ESCAPE '\\\\'",
|
||||
"mytable.myid ILIKE %(myid_1)s::VARCHAR ESCAPE '\\'",
|
||||
dialect=postgresql.dialect(),
|
||||
)
|
||||
|
||||
def test_like_8(self):
|
||||
self.assert_compile(
|
||||
~self.table1.c.myid.ilike("somstr", escape="\\"),
|
||||
"mytable.myid NOT ILIKE %(myid_1)s::VARCHAR ESCAPE '\\\\'",
|
||||
"mytable.myid NOT ILIKE %(myid_1)s::VARCHAR ESCAPE '\\'",
|
||||
dialect=postgresql.dialect(),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user