class StatementPrefetch

An implementation of DatabaseStatementInterface that prefetches all data.

This class behaves very similar to a PDOStatement but as it always fetches every row it is possible to manipulate those results.

Hierarchy

Expanded class hierarchy of StatementPrefetch

1 file declares its use of StatementPrefetch

File

drupal/core/lib/Drupal/Core/Database/StatementPrefetch.php, line 21
Definition of Drupal\Core\Database\StatementPrefetch

Namespace

Drupal\Core\Database
View source

Members

Namesort descending Modifiers Type Description Overrides
StatementPrefetch::$columnNames protected property The list of column names in this result set.
StatementPrefetch::$currentKey protected property The key of the current row.
StatementPrefetch::$currentRow protected property The current row, retrieved in PDO::FETCH_ASSOC format.
StatementPrefetch::$data protected property Main data store.
StatementPrefetch::$dbh public property Reference to the database connection object for this statement.
StatementPrefetch::$defaultFetchOptions protected property Holds supplementary default fetch options.
StatementPrefetch::$defaultFetchStyle protected property Holds the default fetch style.
StatementPrefetch::$driverOptions protected property Driver-specific options. Can be used by child classes.
StatementPrefetch::$fetchOptions protected property Holds supplementary current fetch options (which will be used by the next fetch).
StatementPrefetch::$fetchStyle protected property Holds the current fetch style (which will be used by the next fetch).
StatementPrefetch::$queryString protected property The query string.
StatementPrefetch::$resultRowCount protected property The number of rows in this result set.
StatementPrefetch::$rowCount protected property The number of rows affected by the last query.
StatementPrefetch::current public function Return the current row formatted according to the current fetch style.
StatementPrefetch::execute public function Executes a prepared statement. Overrides StatementInterface::execute 1
StatementPrefetch::fetch public function
StatementPrefetch::fetchAll public function
StatementPrefetch::fetchAllAssoc public function Returns the result set as an associative array keyed by the given field. Overrides StatementInterface::fetchAllAssoc
StatementPrefetch::fetchAllKeyed public function Returns the entire result set as a single associative array. Overrides StatementInterface::fetchAllKeyed
StatementPrefetch::fetchAssoc public function Fetches the next row and returns it as an associative array. Overrides StatementInterface::fetchAssoc
StatementPrefetch::fetchCol public function Returns an entire single column of a result set as an indexed array. Overrides StatementInterface::fetchCol
StatementPrefetch::fetchColumn public function
StatementPrefetch::fetchField public function Returns a single field from the next record of a result set. Overrides StatementInterface::fetchField
StatementPrefetch::fetchObject public function
StatementPrefetch::getQueryString public function Return the object's SQL query string. Overrides StatementInterface::getQueryString
StatementPrefetch::getStatement protected function Grab a PDOStatement object from a given query and its arguments. 1
StatementPrefetch::key public function
StatementPrefetch::next public function
StatementPrefetch::rewind public function
StatementPrefetch::rowCount public function Returns the number of rows affected by the last SQL statement. Overrides StatementInterface::rowCount
StatementPrefetch::setFetchMode public function
StatementPrefetch::throwPDOException protected function Throw a PDO Exception based on the last PDO error.
StatementPrefetch::valid public function
StatementPrefetch::__construct public function