function SelectExtender::countQuery
Get the equivalent COUNT query of this query as a new query object.
Return value
\Drupal\Core\Database\Query\SelectInterface A new SelectQuery object with no fields or expressions besides COUNT(*).
Overrides SelectInterface::countQuery
1 method overrides SelectExtender::countQuery()
- SearchQuery::countQuery in core/
modules/ search/ src/ SearchQuery.php  - Builds the default count query for SearchQuery.
 
File
- 
              core/
lib/ Drupal/ Core/ Database/ Query/ SelectExtender.php, line 441  
Class
- SelectExtender
 - The base extender class for Select queries.
 
Namespace
Drupal\Core\Database\QueryCode
public function countQuery() {
  return $this->query
    ->countQuery();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.