Get data filter review
-
bulk filter parsing done using a regex instead of manual parsing. It also allows to filter if the column name contains ':' by enclosing it in double quotation marks (e.g.
"Sensor:0":lt:1
"Sensor:180":gt:42
). This replace the functionparse_filter
. -
bulk filter regex defined at query param declaration.
-
bulk filter operators defined only once as an enum instead of multiple times (here, here and here).
-
explicit class instead of raw dict.
-
Code from
get_parsed_filters
moved insideBulkReadFilters
nit: I removed the URL link to https://www.moesif.com/blog/technical/api-design/REST-API-Design-Filtering-Sorting-and-Pagination/#rhs-colon/
from param filter description because it does provide much insights moreover it's quite misleading since the syntax used in wdms is different: price=gte:10
vs price:gte:10