function PrefetchedResult::rowCount

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Database/Statement/PrefetchedResult.php \Drupal\Core\Database\Statement\PrefetchedResult::rowCount()

Returns the number of rows matched by the last SQL statement.

Return value

int The number of rows matched by the last DELETE, INSERT, or UPDATE statement executed or throws \Drupal\Core\Database\RowCountException if the last executed statement was SELECT.

Overrides ResultBase::rowCount

File

core/lib/Drupal/Core/Database/Statement/PrefetchedResult.php, line 52

Class

PrefetchedResult
Class for prefetched results of a data query language (DQL) statement.

Namespace

Drupal\Core\Database\Statement

Code

public function rowCount() : ?int {
  return $this->rowCount;
}

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