pip_services3_commons.data.ProjectionParams module
pip_services3_commons.data.ProjectionParams
Data projection 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.ProjectionParams.
ProjectionParams
(values: Sequence[Any] = None) Bases:
list
Defines projection parameters with list if fields to include into query results.
The parameters support two formats: dot format and nested format.
The dot format is the standard way to define included fields and subfields using dot object notation: “field1,field2.field21,field2.field22.field221”.
As alternative the nested format offers a more compact representation: “field1,field2(field21,field22(field221))”.
Example:
filter = FilterParams.fromTuples("type", "Type1") paging = PagingParams(0, 100) projection = ProjectionParams.from_value(["field1","field2(field21,field22)"]) or projection = ProjectionParams.from_string("field1,field2(field21,field22)") myDataClient.get_data_by_filter(filter, paging, projection)
-
default_delimiter
= ','
-
static
from_string
(*values: str) → pip_services3_commons.data.ProjectionParams.ProjectionParams Parses comma-separated list of projection fields.
- Parameters
values – one or more comma-separated lists of projection fields
- Returns
a newly created ProjectionParams.
-
static
from_value
(value: Any) → pip_services3_commons.data.ProjectionParams.ProjectionParams Converts specified args into ProjectionParams.
- Parameters
value – args to be converted
- Returns
a newly created ProjectionParams.
-