Add before and after parameter to get_history API command

This commit is contained in:
JonnyWong16 2021-11-29 20:00:31 -08:00
parent 98fe7d7a0f
commit eee5402c80
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 17 additions and 1 deletions

View file

@ -160,6 +160,9 @@ def build_custom_where(custom_where=[]):
elif str(w_).startswith('LIKE '):
c_where += w[0] + ' LIKE ?'
args.append(w_[5:])
elif w[0].endswith('<') or w[0].endswith('>'):
c_where += w[0] + '= ?'
args.append(w_)
else:
c_where += w[0] + ' = ?'
args.append(w_)
@ -171,6 +174,9 @@ def build_custom_where(custom_where=[]):
elif str(w[1]).startswith('LIKE '):
c_where += w[0] + ' LIKE ?'
args.append(w[1][5:])
elif w[0].endswith('<') or w[0].endswith('>'):
c_where += w[0] + '= ?'
args.append(w[1])
else:
c_where += w[0] + ' = ?'
args.append(w[1])