Allow ranged SQL queries
This commit is contained in:
parent
38c663ee95
commit
6e55c8b7c7
1 changed files with 4 additions and 0 deletions
|
@ -28,6 +28,10 @@ class DbCursor:
|
||||||
else:
|
else:
|
||||||
if key.startswith("not__"):
|
if key.startswith("not__"):
|
||||||
query_wheres.append(key.replace("not__", "") + " != ?")
|
query_wheres.append(key.replace("not__", "") + " != ?")
|
||||||
|
elif key.endswith(">"):
|
||||||
|
query_wheres.append(key.replace(">", "") + " > ?")
|
||||||
|
elif key.endswith("<"):
|
||||||
|
query_wheres.append(key.replace("<", "") + " < ?")
|
||||||
else:
|
else:
|
||||||
query_wheres.append(key + " = ?")
|
query_wheres.append(key + " = ?")
|
||||||
values.append(value)
|
values.append(value)
|
||||||
|
|
Loading…
Reference in a new issue