Improve separation of concerns in SqlBase

Created on 19 January 2025, 3 months ago

Problem/Motivation

This issue comes out of the discussion on πŸ› SqlBase::prepareQuery() should be called also on count Needs work . We could find a better solution for that issue if we clearly separated the concerns, with documentation, of the various methods in Drupal\migrate\Plugin\migrate\source\SqlBase.

Currently, those method include

  • query()
  • prepareQuery()
  • initializeIterator()

Proposed resolution

To be determined: consider this section to be a draft.

  1. Add the prepareCountQuery() method.
  2. Consider adding prepareMigrationQuery() and deprecating prepareQuery().
  3. Refactor initializeIterator() so that it is easier to modify.
  4. Make sure to document these methods clearly.

Remaining tasks

User interface changes

None

Introduced terminology

None

API changes

TBD: probably some API additions, perhaps some deprecations.

Data model changes

None

Release notes snippet

N/A

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component

migration system

Created by

πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024