function ResultBase::setFetchMode
Sets the default fetch mode for this result set.
Parameters
\Drupal\Core\Database\FetchAs $mode: One of the cases of the FetchAs enum.
array{class: class-string, constructor_args: list<mixed>, column: int, cursor_orientation?: int, cursor_offset?: int} $fetchOptions: An array of fetch options.
Return value
bool TRUE if successful, FALSE if not.
2 methods override ResultBase::setFetchMode()
- PdoResult::setFetchMode in core/
lib/ Drupal/ Core/ Database/ Statement/ PdoResult.php - Sets the default fetch mode for this result set.
- PrefetchedResult::setFetchMode in core/
lib/ Drupal/ Core/ Database/ Statement/ PrefetchedResult.php - Sets the default fetch mode for this result set.
File
-
core/
lib/ Drupal/ Core/ Database/ Statement/ ResultBase.php, line 53
Class
- ResultBase
- Base class for results of a data query language (DQL) statement.
Namespace
Drupal\Core\Database\StatementCode
public abstract function setFetchMode(FetchAs $mode, array $fetchOptions) : bool;
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.