Statement

Default implementation of StatementInterface.

\PDO allows us to extend the \PDOStatement class to provide additional functionality beyond that offered by default. We do need extra functionality. By default, this class is not driver-specific. If a given driver needs to set a custom statement class, it may do so in its constructor.

Hierarchy

See also

http://php.net/pdostatement

File

core/lib/Drupal/Core/Database/Statement.php, line 16

Namespace

Drupal\Core\Database

Members

Name Modifiers Type Description
Statement::$allowRowCount public property Is rowCount() execution allowed.
Statement::$dbh public property Reference to the database connection object for this statement.
Statement::execute public function Executes a prepared statement Overrides StatementInterface::execute
Statement::fetchAll public function Returns an array containing all of the result set rows. Overrides StatementInterface::fetchAll
Statement::fetchAllAssoc public function Returns the result set as an associative array keyed by the given field. Overrides StatementInterface::fetchAllAssoc
Statement::fetchAllKeyed public function Returns the entire result set as a single associative array. Overrides StatementInterface::fetchAllKeyed
Statement::fetchAssoc public function Fetches the next row and returns it as an associative array. Overrides StatementInterface::fetchAssoc
Statement::fetchCol public function Returns an entire single column of a result set as an indexed array. Overrides StatementInterface::fetchCol
Statement::fetchField public function Returns a single field from the next record of a result set. Overrides StatementInterface::fetchField
Statement::getQueryString public function Gets the query string of this statement. Overrides StatementInterface::getQueryString
Statement::rowCount public function Returns the number of rows affected by the last SQL statement. Overrides StatementInterface::rowCount
Statement::setFetchMode public function Sets the default fetch mode for this statement. Overrides StatementInterface::setFetchMode
Statement::__construct protected function
StatementInterface::fetch public function Fetches the next row from a result set.
StatementInterface::fetchObject public function Fetches the next row and returns it as an object.
doc_Drupal
2016-10-29 09:44:00
Comments
Leave a Comment

Please login to continue.