function Upload::query
Prepares query object to retrieve data from the source database.
This method should not be called directly. It is called automatically from SqlBase::prepareQuery().
Return value
\Drupal\Core\Database\Query\SelectInterface A Select query object with the source data.
Overrides SqlBase::query
File
- 
              core/modules/ file/ src/ Plugin/ migrate/ source/ d6/ Upload.php, line 31 
Class
- Upload
- Drupal 6 upload source from database.
Namespace
Drupal\file\Plugin\migrate\source\d6Code
public function query() {
  $query = $this->select('upload', 'u')
    ->distinct()
    ->fields('u', [
    'nid',
    'vid',
  ]);
  $query->innerJoin('node', 'n', static::JOIN);
  $query->addField('n', 'type');
  $query->addField('n', 'language');
  return $query;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
