Mercurial > libervia-backend
changeset 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 | dbfedde9bc61 |
children | fa1cc09df195 |
files | sat/memory/sqlite.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
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 ?")