From 8830a7c1d59a3c06b88556991414d5be0bf99495 Mon Sep 17 00:00:00 2001 From: Goffi Date: Sat, 9 Mar 2019 16:24:15 +0100 Subject: [PATCH] core (memory/sqlite): added a "timestamp_start" filter to retrieve history from a specific point in time --- sat/memory/sqlite.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sat/memory/sqlite.py b/sat/memory/sqlite.py index ad670878..ee5b8cba 100644 --- a/sat/memory/sqlite.py +++ b/sat/memory/sqlite.py @@ -590,6 +590,9 @@ class SqliteStorage(object): order = False if filters: + if u'timestamp_start' in filters: + query_parts.append(u"AND timestamp>= ?") + values.append(int(filters[u'timestamp_start'])) if u'body' in filters: # TODO: use REGEXP (function to be defined) instead of GLOB: https://www.sqlite.org/lang_expr.html query_parts.append(u"AND message LIKE ?")