class DatabaseStatementPrefetch

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 DatabaseStatementPrefetch

Related topics

File

includes/database/prefetch.inc, line 22
Database interface code for engines that need complete control over their result sets. For example, SQLite will prefix some column names by the name of the table. We post-process the data, by renaming the column names using the same convention as…

Members

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!database!prefetch.inc/class/DatabaseStatementPrefetch/7.x