QueryAggregateInterface::conditionAggregateGroupFactory

public QueryAggregateInterface::conditionAggregateGroupFactory($conjunction = 'AND') Creates an object holding a group of conditions. See andConditionAggregateGroup() and orConditionAggregateGroup() for more. Parameters string $conjunction: AND (default): this is the equivalent of andConditionAggregateGroup(). OR: this is the equivalent of andConditionAggregateGroup(). Return value ConditionInterface An object holding a group of conditions. File core/lib/Drupal/Core/Entity/Query/QueryAggr

QueryAggregateInterface::conditionAggregate

public QueryAggregateInterface::conditionAggregate($field, $function = NULL, $value = NULL, $operator = '=', $langcode = NULL) Sets a condition for an aggregated value. Parameters string $field: The name of the field to aggregate by. string $function: The aggregation function, for example COUNT or MIN. mixed $value: The actual value of the field. $operator: Possible values: '=', '<>', '>', '>=', '<', '<=', 'STARTS_WITH', 'CONTAINS', 'ENDS_WITH': These operators expect $value

QueryAggregateInterface::aggregate

public QueryAggregateInterface::aggregate($field, $function, $langcode = NULL, &$alias = NULL) Specifies a field and a function to aggregate on. Available functions: SUM, AVG, MIN, MAX and COUNT. @todo What about GROUP_CONCAT support? Parameters string $field: The name of the field to aggregate by. string $function: The aggregation function, for example COUNT or MIN. string $langcode: (optional) The language code. string $alias: (optional) The key that will be used on the resultset. Return

QueryAggregateInterface

Defines a interface for aggregated entity queries. Hierarchy interface \Drupal\Core\Database\Query\AlterableInterfaceinterface \Drupal\Core\Entity\Query\QueryInterfaceinterface \Drupal\Core\Entity\Query\QueryAggregateInterface File core/lib/Drupal/Core/Entity/Query/QueryAggregateInterface.php, line 8 Namespace Drupal\Core\Entity\Query Members Name Modifiers Type Description AlterableInterface::addMetaData public function Adds additional metadata to the query. Alterab

QueryAggregate::result

protected QueryAggregate::result() Overrides \Drupal\Core\Entity\Query\Sql\Query::result(). Return value array|int Returns the aggregated result, or a number if it's a count query. Overrides Query::result File core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php, line 169 Class QueryAggregate The SQL storage entity query aggregate class. Namespace Drupal\Core\Entity\Query\Sql Code protected function result() { if ($this->count) { return parent::result(); } $return = a

QueryAggregate::prepare

public QueryAggregate::prepare() Prepares the basic query with proper metadata/tags and base fields. Return value \Drupal\Core\Entity\Query\Sql\Query Returns the called object. Throws \Drupal\Core\Entity\Query\QueryException Thrown if the base table does not exist. Overrides Query::prepare File core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php, line 39 Class QueryAggregate The SQL storage entity query aggregate class. Namespace Drupal\Core\Entity\Query\Sql Code public function

QueryAggregate::notExistsAggregate

public QueryAggregate::notExistsAggregate($field, $function, $langcode = NULL) Queries for the nonexistence of a field. Parameters string $field.: The name of a field. string $function: The aggregate function. string $langcode: (optional) The language code. Return value \Drupal\Core\Entity\Query\QueryAggregateInterface The called object. Overrides QueryAggregateInterface::notExistsAggregate File core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php, line 64 Class QueryAggregate The SQ

QueryAggregate::finish

protected QueryAggregate::finish() Overrides \Drupal\Core\Entity\Query\Sql\Query::finish(). Adds the sql expressions to the query. Overrides Query::finish File core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php, line 135 Class QueryAggregate The SQL storage entity query aggregate class. Namespace Drupal\Core\Entity\Query\Sql Code protected function finish() { foreach ($this->sqlExpressions as $alias => $expression) { $this->sqlQuery->addExpression($expression, $

QueryAggregate::existsAggregate

public QueryAggregate::existsAggregate($field, $function, $langcode = NULL) Queries for the existence of a field. Parameters string $field: The name of the field. string $function: The aggregate function. $langcode: (optional) The language code. Return value \Drupal\Core\Entity\Query\QueryAggregateInterface The called object. Overrides QueryAggregateInterface::existsAggregate File core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php, line 57 Class QueryAggregate The SQL storage entit

QueryAggregate::execute

public QueryAggregate::execute() Execute the query. Return value int|array Returns an integer for count queries or an array of ids. The values of the array are always entity ids. The keys will be revision ids if the entity supports revision and entity ids if not. Overrides Query::execute File core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php, line 23 Class QueryAggregate The SQL storage entity query aggregate class. Namespace Drupal\Core\Entity\Query\Sql Code public function ex