Projection¶
- class Projection(*args, **kwds)[source]¶
Bases:
Generic
[hazelcast.types.ProjectionType
]Marker base class for all projections.
Projections allow the client to transform (strip down) each query result object in order to avoid redundant network traffic.
- single_attribute(attribute_path: str) hazelcast.projection.Projection[hazelcast.types.ProjectionType] [source]¶
Creates a projection that extracts the value of the given attribute path.
- Parameters
attribute_path – Path to extract the attribute from.
- Returns
A projection that extracts the value of the given attribute path.
- multi_attribute(*attribute_paths: str) hazelcast.projection.Projection[List[Any]] [source]¶
Creates a projection that extracts the values of one or more attribute paths.
- Parameters
*attribute_paths – Paths to extract the attributes from.
- Returns
A projection that extracts the values of the given attribute paths.
- identity() hazelcast.projection.Projection[hazelcast.core.MapEntry[hazelcast.types.KeyType, hazelcast.types.ValueType]] [source]¶
Creates a projection that does no transformation.
- Returns
A projection that does no transformation.