class DatabaseStatementEmpty
Empty implementation of a database statement.
This class satisfies the requirements of being a database statement/result object, but does not actually contain data. It is useful when developers need to safely return an "empty" result set without connecting to an actual database. Calling code can then treat it the same as if it were an actual result set that happens to contain no records.
Hierarchy
- class \DatabaseStatementEmpty implements \Iterator, DatabaseStatementInterface
Expanded class hierarchy of DatabaseStatementEmpty
See also
Related topics
File
- includes/database/ database.inc, line 2272
- Core systems for the database layer.
Members
Name | Modifiers | Type | Description |
---|---|---|---|
DatabaseStatementEmpty::current | public | function | |
DatabaseStatementEmpty::execute | public | function | Executes a prepared statement Overrides DatabaseStatementInterface::execute |
DatabaseStatementEmpty::fetch | public | function | |
DatabaseStatementEmpty::fetchAll | function | ||
DatabaseStatementEmpty::fetchAllAssoc | public | function | Returns the result set as an associative array keyed by the given field. Overrides DatabaseStatementInterface::fetchAllAssoc |
DatabaseStatementEmpty::fetchAllKeyed | public | function | Returns the entire result set as a single associative array. Overrides DatabaseStatementInterface::fetchAllKeyed |
DatabaseStatementEmpty::fetchAssoc | public | function | Fetches the next row and returns it as an associative array. Overrides DatabaseStatementInterface::fetchAssoc |
DatabaseStatementEmpty::fetchCol | public | function | Returns an entire single column of a result set as an indexed array. Overrides DatabaseStatementInterface::fetchCol |
DatabaseStatementEmpty::fetchField | public | function | Returns a single field from the next record of a result set. Overrides DatabaseStatementInterface::fetchField |
DatabaseStatementEmpty::fetchObject | public | function | |
DatabaseStatementEmpty::getQueryString | public | function | Gets the query string of this statement. Overrides DatabaseStatementInterface::getQueryString |
DatabaseStatementEmpty::key | public | function | |
DatabaseStatementEmpty::next | public | function | |
DatabaseStatementEmpty::rewind | public | function | |
DatabaseStatementEmpty::rowCount | public | function | Returns the number of rows affected by the last SQL statement. Overrides DatabaseStatementInterface::rowCount |
DatabaseStatementEmpty::setFetchMode | public | function | |
DatabaseStatementEmpty::valid | 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!database.inc/class/DatabaseStatementEmpty/7.x