-
Notifications
You must be signed in to change notification settings - Fork 0
Home
tim edited this page May 25, 2018
·
1 revision
Welcome to the queryfilter wiki!
if provides a unify to query data to query different data source such as Django and a list of dictionary
e.g.
dicts = [
{"age": None},
{"age": 1},
{"age": None},
{"age": 2},
]
query_filter = QueryFilter({
"age": {
"type": "number",
"options": {"drop_none": True},
"min": 0,
"max": 1,
}
})
assert len(query_filter.on_dicts(dicts)) == 1
the following are currently provided filters
TextFullyMatchedFilter
TextPartialMatchedFilter
TextStartsWithMatchedFilter
TextEndsWithMatchedFilter
SelectFilter
NumberRangeFilter
BirthdayDateRangeFilter
DatetimeRangeFilter
NumberRangeFilter and BirthdayDateRangeFilter only support dictionary data. Django support will be added soon