function StatementIteratorTrait::setResultsetCurrentRow

Same name and namespace in other branches
  1. 10 core/lib/Drupal/Core/Database/StatementIteratorTrait.php \Drupal\Core\Database\StatementIteratorTrait::setResultsetCurrentRow()

Sets the current resultset row for the iterator, and increments the key.

Parameters

mixed $row: The last row fetched from the client statement.

4 calls to StatementIteratorTrait::setResultsetCurrentRow()
StatementPrefetchIterator::fetch in core/lib/Drupal/Core/Database/StatementPrefetchIterator.php
Fetches the next row from a result set.
StatementWrapperIterator::fetch in core/lib/Drupal/Core/Database/StatementWrapperIterator.php
Fetches the next row from a result set.
StatementWrapperIterator::fetchField in core/lib/Drupal/Core/Database/StatementWrapperIterator.php
Returns a single field from the next record of a result set.
StatementWrapperIterator::fetchObject in core/lib/Drupal/Core/Database/StatementWrapperIterator.php
Fetches the next row and returns it as an object.

File

core/lib/Drupal/Core/Database/StatementIteratorTrait.php, line 51

Class

StatementIteratorTrait
StatementInterface iterator trait.

Namespace

Drupal\Core\Database

Code

protected function setResultsetCurrentRow(mixed $row) : void {
    $this->resultsetRow = $row;
    $this->resultsetKey++;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.