Google\Cloud\Datastore\Query\Query::distinctOn PHP Метод

distinctOn() публичный Метод

The query results will contain the first result for each distinct combination of values for the given properties (if empty, all results are returned). Example: $query->distinctOn('lastName');
public distinctOn ( array | string $property ) : Query
$property array | string The property or properties to make distinct.
Результат Query
    public function distinctOn($property)
    {
        if (!is_array($property)) {
            $property = [$property];
        }
        foreach ($property as $prop) {
            $this->query['distinctOn'][] = $this->propertyName($prop);
        }
        return $this;
    }