You are here

protected function SqlBase::prepareQuery in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/migrate/src/Plugin/migrate/source/SqlBase.php \Drupal\migrate\Plugin\migrate\source\SqlBase::prepareQuery()

A helper for adding tags and metadata to the query.

Return value

\Drupal\Core\Database\Query\SelectInterface The query with additional tags and metadata.

1 call to SqlBase::prepareQuery()
SqlBase::initializeIterator in core/modules/migrate/src/Plugin/migrate/source/SqlBase.php
Implementation of MigrateSource::performRewind().

File

core/modules/migrate/src/Plugin/migrate/source/SqlBase.php, line 144
Contains \Drupal\migrate\Plugin\migrate\source\SqlBase.

Class

SqlBase
Sources whose data may be fetched via DBTNG.

Namespace

Drupal\migrate\Plugin\migrate\source

Code

protected function prepareQuery() {
  $this->query = clone $this
    ->query();
  $this->query
    ->addTag('migrate');
  $this->query
    ->addTag('migrate_' . $this->migration
    ->id());
  $this->query
    ->addMetaData('migration', $this->migration);
  return $this->query;
}