Adding a single quote to a query utilizing MATCH will break the query. I modified the test case to induce the behavior:
def test_simple_match(self):
query = self.session.query(self.Character.name) \
.filter(match(self.Character.name, 'Trill\'ian'))
self.assertSQL(
"SELECT characters.name AS characters_name FROM characters WHERE match(characters.name, 'Trill\\'ian')",
query
)
Result:
Failure
Expected :"SELECT characters.name AS characters_name FROM characters WHERE match(characters.name, 'Trill\\'ian')"
Actual :"SELECT characters.name AS characters_name FROM characters WHERE match(characters.name, 'Trill'ian')"
The output of the test error is a little misleading - the comparison is of course taking place without the escapes.
Adding a single quote to a query utilizing MATCH will break the query. I modified the test case to induce the behavior:
Result:
The output of the test error is a little misleading - the comparison is of course taking place without the escapes.