Problem/Motivation

StatementInterface objects are traversable and the concrete classes implement \Iterator. This is likely an historical extension of the PDOStatement.

However, conceptually statements should not be iterated - that's a property of the result set, that is now represented by ResultBase objects.

Proposed resolution

In this issue, make ResultBase iterable, and let StatementInterface implementation rely on that for iteration.

Later we may discuss whether we should deprecate and then remove iterability of the statements themselves.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3592863

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mondrake created an issue. See original summary.

nicxvan’s picture

Title: Transfer responsability of iterating through a result recordset from StatementBase to ResultBase » Transfer responsibility of iterating through a result recordset from StatementBase to ResultBase
mondrake’s picture

Issue summary: View changes
mondrake’s picture

Status: Active » Needs review