function StatementPrefetchIterator::getClientStatement

Returns the client-level database PDO statement object.

This method should normally be used only within database driver code.

Return value

\PDOStatement The client-level database PDO statement.

Throws

\RuntimeException If the client-level statement is not set.

Overrides StatementBase::getClientStatement

File

core/lib/Drupal/Core/Database/StatementPrefetchIterator.php, line 110

Class

StatementPrefetchIterator
An implementation of StatementInterface that prefetches all data.

Namespace

Drupal\Core\Database

Code

public function getClientStatement() : \PDOStatement {
  if (isset($this->clientStatement)) {
    assert($this->clientStatement instanceof \PDOStatement);
    return $this->clientStatement;
  }
  throw new \LogicException('\\PDOStatement not initialized');
}

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