Problem/Motivation
There is quite some duplicated or nearly duplicated code in StatementWrapperIterator and StatementPrefetchIterator.
One common base class that would be a parent of both of these will help removing the duplication.
It would also make alternative implementations easier, like the one needed for mysqli in #3259709: Create the database driver for MySQLi.
Steps to reproduce
Introduce an abstract StatementBase class, common to both StatementWrapperIterator and StatementPrefetchIterator classes. Also introduce helper classes to manage results of execution statements, to cover PDO and prefetched. This will make the mysqli statement class very small, and the mysqli result class be managed via our own result class.
Proposed resolution
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3488467
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:
- 3488467-pp-1-introduce-a
changes, plain diff MR !10263
Comments
Comment #3
mondrakeComment #4
mondrakeComment #5
mondrakeComment #6
andypostComment #7
mondrakeNot ready yet.
Comment #8
mondrakeComment #9
mondrakeReady for review - thanks!
Comment #10
mondrakeComment #11
daffie commentedComment #12
mondrakeThanks @daffie for your review. Fixed your points and answered your question.
Comment #13
mondrakeI have refreshed #3259709: Create the database driver for MySQLi MR!11355 with the latest changes here - I suggest when reviewing this also seeing that one for how a new implementation of this looks.
Comment #14
daffie commentedI have reviewed the code changes and they look good.
My question has been answered.
There is already a lot of testing in core.
The change for a BC break is very small. Very unlikely.
For me it is RTBC.
Comment #16
catchThis looks good to me, couldn't find anything to complain about. Committed/pushed to 11.x, thanks!