public function SelectExtender::countQuery

public 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

File

core/lib/Drupal/Core/Database/Query/SelectExtender.php, line 436

Class

SelectExtender
The base extender class for Select queries.

Namespace

Drupal\Core\Database\Query

Code

public function countQuery() {
  return $this->query->countQuery();
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Database!Query!SelectExtender.php/function/SelectExtender::countQuery/8.1.x