function SqlBase::prepareQuery
Adds tags and metadata to the query.
Return value
\Drupal\Core\Database\Query\SelectInterface The query with additional tags and metadata.
3 calls to SqlBase::prepareQuery()
- SqlBase::initializeIterator in core/modules/ migrate/ src/ Plugin/ migrate/ source/ SqlBase.php 
- Initializes the iterator with the source data.
- SqlBase::__toString in core/modules/ migrate/ src/ Plugin/ migrate/ source/ SqlBase.php 
- Prints the query string when the object is used as a string.
- TestSqlPrepareQuery::prepareQuery in core/modules/ migrate/ tests/ modules/ migrate_sql_prepare_query_test/ src/ Plugin/ migrate/ source/ TestSqlPrepareQuery.php 
- Adds tags and metadata to the query.
1 method overrides SqlBase::prepareQuery()
- TestSqlPrepareQuery::prepareQuery in core/modules/ migrate/ tests/ modules/ migrate_sql_prepare_query_test/ src/ Plugin/ migrate/ source/ TestSqlPrepareQuery.php 
- Adds tags and metadata to the query.
File
- 
              core/modules/ migrate/ src/ Plugin/ migrate/ source/ SqlBase.php, line 238 
Class
- SqlBase
- Sources whose data may be fetched via a database connection.
Namespace
Drupal\migrate\Plugin\migrate\sourceCode
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;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
