You are here

public function Upload::query in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/file/src/Plugin/migrate/source/d6/Upload.php \Drupal\file\Plugin\migrate\source\d6\Upload::query()

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

core/modules/file/src/Plugin/migrate/source/d6/Upload.php, line 31
Contains \Drupal\file\Plugin\migrate\source\d6\Upload.

Class

Upload
Drupal 6 upload source from database.

Namespace

Drupal\file\Plugin\migrate\source\d6

Code

public function query() {
  $query = $this
    ->select('upload', 'u')
    ->distinct()
    ->fields('u', array(
    'nid',
    'vid',
  ));
  $query
    ->innerJoin('node', 'n', static::JOIN);
  $query
    ->addField('n', 'type');
  return $query;
}