comparison sat/memory/sqlite.py @ 2895:1a23547f95fd

memory (sqlite): cast timestamp_start filter to float instead of int
author Goffi <goffi@goffi.org>
date Sun, 07 Apr 2019 20:57:13 +0200
parents 28fe69b87ba4
children 21cf8395616c
comparison
equal deleted inserted replaced
2894:c7c52c0dc13a 2895:1a23547f95fd
592 order = False 592 order = False
593 593
594 if filters: 594 if filters:
595 if u'timestamp_start' in filters: 595 if u'timestamp_start' in filters:
596 query_parts.append(u"AND timestamp>= ?") 596 query_parts.append(u"AND timestamp>= ?")
597 values.append(int(filters[u'timestamp_start'])) 597 values.append(float(filters[u'timestamp_start']))
598 if u'body' in filters: 598 if u'body' in filters:
599 # TODO: use REGEXP (function to be defined) instead of GLOB: https://www.sqlite.org/lang_expr.html 599 # TODO: use REGEXP (function to be defined) instead of GLOB: https://www.sqlite.org/lang_expr.html
600 query_parts.append(u"AND message LIKE ?") 600 query_parts.append(u"AND message LIKE ?")
601 values.append(u"%{}%".format(filters['body'])) 601 values.append(u"%{}%".format(filters['body']))
602 if u'search' in filters: 602 if u'search' in filters: