Allow like parameters in database queries

This commit is contained in:
shortcutme 2019-07-10 03:14:09 +02:00
parent 67d6b1e724
commit f4f0e2afa8
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 7 additions and 0 deletions

View file

@ -49,6 +49,8 @@ class DbCursor:
else:
if key.startswith("not__"):
query_wheres.append(key.replace("not__", "") + " != ?")
elif key.endswith("__like"):
query_wheres.append(key.replace("__like", "") + " LIKE ?")
elif key.endswith(">"):
query_wheres.append(key.replace(">", "") + " > ?")
elif key.endswith("<"):