function StatementBase::getClientStatement

Returns the client-level database statement object.

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

Return value

object The client-level database statement.

Throws

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

Overrides PdoTrait::getClientStatement

3 methods override StatementBase::getClientStatement()
Statement::getClientStatement in core/modules/mysqli/src/Driver/Database/mysqli/Statement.php
Returns the client-level database statement object.
StatementPrefetchIterator::getClientStatement in core/lib/Drupal/Core/Database/StatementPrefetchIterator.php
Returns the client-level database PDO statement object.
StatementWrapperIterator::getClientStatement in core/lib/Drupal/Core/Database/StatementWrapperIterator.php
Returns the client-level database PDO statement object.

File

core/lib/Drupal/Core/Database/Statement/StatementBase.php, line 111

Class

StatementBase
StatementInterface base implementation.

Namespace

Drupal\Core\Database\Statement

Code

public function getClientStatement() : object {
  if ($this->hasClientStatement()) {
    return $this->clientStatement;
  }
  throw new \LogicException('Client statement not initialized');
}

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