core (memory/sqlite): added before_uid filter to retrieve history before a message UID
This commit is contained in:
parent
6bf470ea9f
commit
3ccd27de87
1 changed files with 4 additions and 0 deletions
|
|
@ -625,6 +625,9 @@ class SqliteStorage(object):
|
|||
if 'timestamp_start' in filters:
|
||||
query_parts.append("AND timestamp>= ?")
|
||||
values.append(float(filters['timestamp_start']))
|
||||
if 'before_uid' in filters:
|
||||
query_parts.append("AND history.rowid<(select rowid from history where uid=?)")
|
||||
values.append(filters['before_uid'])
|
||||
if 'body' in filters:
|
||||
# TODO: use REGEXP (function to be defined) instead of GLOB: https://www.sqlite.org/lang_expr.html
|
||||
query_parts.append("AND message LIKE ?")
|
||||
|
|
|
|||
Loading…
Reference in a new issue