diff sat/memory/sqlite.py @ 2843:a425c1ca51d0

core (memory/sqlite): added a "timestamp_start" filter to retrieve history from a specific point in time
author Goffi <goffi@goffi.org>
date Sat, 09 Mar 2019 16:24:15 +0100
parents 298408833ec2
children 28fe69b87ba4
line wrap: on
line diff
--- a/sat/memory/sqlite.py	Sat Mar 09 16:23:07 2019 +0100
+++ b/sat/memory/sqlite.py	Sat Mar 09 16:24:15 2019 +0100
@@ -590,6 +590,9 @@
         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 ?")