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 \Drupal\Core\Database\StatementEmpty implements \Iterator, StatementInterface
See also
File
- core/lib/Drupal/Core/Database/StatementEmpty.php, line 17
Namespace
Drupal\Core\Database
Members
Name | Modifiers | Type | Description |
---|---|---|---|
StatementEmpty::$allowRowCount | public | property | Is rowCount() execution allowed. |
StatementEmpty::current | public | function | |
StatementEmpty::execute | public | function | Executes a prepared statement Overrides StatementInterface::execute |
StatementEmpty::fetch | public | function | Fetches the next row from a result set. Overrides StatementInterface::fetch |
StatementEmpty::fetchAll | public | function | Returns an array containing all of the result set rows. Overrides StatementInterface::fetchAll |
StatementEmpty::fetchAllAssoc | public | function | Returns the result set as an associative array keyed by the given field. Overrides StatementInterface::fetchAllAssoc |
StatementEmpty::fetchAllKeyed | public | function | Returns the entire result set as a single associative array. Overrides StatementInterface::fetchAllKeyed |
StatementEmpty::fetchAssoc | public | function | Fetches the next row and returns it as an associative array. Overrides StatementInterface::fetchAssoc |
StatementEmpty::fetchCol | public | function | Returns an entire single column of a result set as an indexed array. Overrides StatementInterface::fetchCol |
StatementEmpty::fetchField | public | function | Returns a single field from the next record of a result set. Overrides StatementInterface::fetchField |
StatementEmpty::fetchObject | public | function | Fetches the next row and returns it as an object. Overrides StatementInterface::fetchObject |
StatementEmpty::getQueryString | public | function | Gets the query string of this statement. Overrides StatementInterface::getQueryString |
StatementEmpty::key | public | function | |
StatementEmpty::next | public | function | |
StatementEmpty::rewind | public | function | |
StatementEmpty::rowCount | public | function | Returns the number of rows affected by the last SQL statement. Overrides StatementInterface::rowCount |
StatementEmpty::setFetchMode | public | function | Sets the default fetch mode for this statement. Overrides StatementInterface::setFetchMode |
StatementEmpty::valid | public | function |
Please login to continue.