function QueryAggregate::execute

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php \Drupal\Core\Entity\Query\Sql\QueryAggregate::execute()
  2. 10 core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php \Drupal\Core\Entity\Query\Sql\QueryAggregate::execute()
  3. 11.x core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php \Drupal\Core\Entity\Query\Sql\QueryAggregate::execute()

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 execute() {
    return $this->prepare()
        ->addAggregate()
        ->compile()
        ->compileAggregate()
        ->addGroupBy()
        ->addSort()
        ->addSortAggregate()
        ->finish()
        ->result();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.