Datastore/src/Query/Query.php
public function projection($properties)
    {
        if (!is_array($properties)) {
            $properties = [$properties];
        }

        foreach ($properties as $property) {
            $this->query['projection'][] = [
                'property' => $this->propertyName($property)
            ];
        }

        return $this;
    }
public function projection($properties)
    {
        if (!is_array($properties)) {
            $properties = [$properties];
        }

        foreach ($properties as $property) {
            $this->query['projection'][] = [
                'property' => $this->propertyName($property)
            ];
        }

        return $this;
    }
public function projection ( $ properties ) { if ( ! is_array ( $ properties ) ) { $ properties = [ $ properties ] ; } foreach ( $ properties as $ property ) { $ this -> query [ 'projection' ] [ ] = [ 'property' => $ this -> propertyName ( $ property ) ] ; } return $ this ; }
Set the Query Projection.

Accepts an array of properties. If set, only these properties will be
returned.

Example:
```
$query->projection(['firstName', 'lastName']);
```

@param array|string $properties The property or properties to include in
the result.
@return Query
Set the Query Projection .