public function StatementPrefetch::next in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Database/StatementPrefetch.php \Drupal\Core\Database\StatementPrefetch::next()
9 calls to StatementPrefetch::next()
- StatementPrefetch::execute in core/
lib/ Drupal/ Core/ Database/ StatementPrefetch.php - Executes a prepared statement
- StatementPrefetch::fetch in core/
lib/ Drupal/ Core/ Database/ StatementPrefetch.php - Fetches the next row from a result set.
- StatementPrefetch::fetchAll in core/
lib/ Drupal/ Core/ Database/ StatementPrefetch.php - Returns an array containing all of the result set rows.
- StatementPrefetch::fetchAllAssoc in core/
lib/ Drupal/ Core/ Database/ StatementPrefetch.php - Returns the result set as an associative array keyed by the given field.
- StatementPrefetch::fetchAllKeyed in core/
lib/ Drupal/ Core/ Database/ StatementPrefetch.php - Returns the entire result set as a single associative array.
File
- core/
lib/ Drupal/ Core/ Database/ StatementPrefetch.php, line 344
Class
- StatementPrefetch
- An implementation of StatementInterface that prefetches all data.
Namespace
Drupal\Core\DatabaseCode
public function next() {
if (!empty($this->data)) {
$this->currentRow = reset($this->data);
$this->currentKey = key($this->data);
unset($this->data[$this->currentKey]);
}
else {
$this->currentRow = NULL;
}
}