public filter ( string $property, string $operator, mixed $value ) : |
||
$property | string | The property to filter. |
$operator | string | The operator to use in the filter. A list of allowed operators may be found [here](https://cloud.google.com/datastore/reference/rest/v1/projects/runQuery#operator_1). Short comparison operators are provided for convenience and are mapped to their datastore-compatible equivalents. Available short operators are `=`, `<`, `<=`, `>`, and `>=`. |
$value | mixed | The value to check. |
Результат |
public function filter($property, $operator, $value)
{
if (!isset($this->query['filter']) || !isset($this->query['filter']['compositeFilter'])) {
$this->initializeFilter();
}
$this->query['filter']['compositeFilter']['filters'][] = ['propertyFilter' => ['property' => $this->propertyName($property), 'value' => $this->entityMapper->valueObject($value), 'op' => $this->mapOperator($operator)]];
return $this;
}