pip_services3_commons.data.FilterParams module

pip_services3_commons.data.FilterParams

Free-form filter parameters implementation

copyright

Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details.

license

MIT, see LICENSE for more details.

class pip_services3_commons.data.FilterParams.FilterParams(map: Any = None)

Bases: pip_services3_commons.data.StringValueMap.StringValueMap

Data transfer object used to pass filter parameters as simple key-args pairs.

Example:

filter = FilterParams.from_tuples("type", "Type1",
"from_create_time", datetime.datetime(2000, 0, 1),
"to_create_time", datetime.datetime.now(),
"completed", True)
paging = PagingParams(0, 100)

myDataClient.get_data_by_filter(filter, paging)
static from_string(line: str)pip_services3_commons.data.FilterParams.FilterParams

Parses semicolon-separated key-args pairs and returns them as a FilterParams.

Parameters

line – semicolon-separated key-args list to initialize FilterParams.

Returns

a newly created FilterParams.

static from_tuples(*tuples: Any)pip_services3_commons.data.FilterParams.FilterParams

Creates a new FilterParams from a list of key-args pairs called tuples.

Parameters

tuples – a list of values where odd elements are keys and the following even elements are values

Returns

a newly created FilterParams.

static from_value(value: Any)pip_services3_commons.data.FilterParams.FilterParams

Converts specified args into FilterParams.

Parameters

value – args to be converted

Returns

a newly created FilterParams.