Merge pull request #381 from mijaba/master

Fix for startswith/endswith
This commit is contained in:
Friedrich Lindenberg 2021-08-11 20:59:22 +02:00 committed by GitHub
commit e5d52d6eee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -413,9 +413,9 @@ class Table(object):
start, end = value
return self.table.c[column].between(start, end)
if op in ("startswith",):
return self.table.c[column].like("%" + value)
if op in ("endswith",):
return self.table.c[column].like(value + "%")
if op in ("endswith",):
return self.table.c[column].like("%" + value)
return false()
def _args_to_clause(self, args, clauses=()):