function PdoTrait::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.

File

core/lib/Drupal/Core/Database/Statement/PdoTrait.php, line 62

Class

PdoTrait
A trait for calling \PDOStatement methods.

Namespace

Drupal\Core\Database\Statement

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.