libgs.database.tfilterstr2query¶
-
libgs.database.
tfilterstr2query
(filters)[source]¶ Convert a timestamp filter string into a well formated where query.
A filter string shall follow the format: <comparator><value>
For example:
'>2018-01-01'
will match anything after 2018-01-01 at 00:00:00:
'<=2019-02-01T14:00:01'
will match anything before or exactly equal to 2019-02-01T14:00:01.
Valid comparators are
<
,>
,<=
,>=
.If no comparator is present, it will match only the exact timestamp specified.
Parameters: filters (list(basestring)) – A list of filter strings in the format described above.