class SqlCountCache

Same name and namespace in other branches
  1. 11.x core/modules/migrate/tests/modules/migrate_sql_count_cache_test/src/Plugin/migrate/source/SqlCountCache.php \Drupal\migrate_sql_count_cache_test\Plugin\migrate\source\SqlCountCache

Source plugin for Sql count cache test.

Plugin annotation


@MigrateSource(
  id = "sql_count_cache"
)

Hierarchy

Expanded class hierarchy of SqlCountCache

File

core/modules/migrate/tests/modules/migrate_sql_count_cache_test/src/Plugin/migrate/source/SqlCountCache.php, line 14

Namespace

Drupal\migrate_sql_count_cache_test\Plugin\migrate\source
View source
class SqlCountCache extends SqlBase {
  
  /**
   * {@inheritdoc}
   */
  public function fields() {
    return [
      'id' => $this->t('Id'),
    ];
  }
  
  /**
   * {@inheritdoc}
   */
  public function getIds() {
    return [
      'id' => [
        'type' => 'integer',
      ],
    ];
  }
  
  /**
   * {@inheritdoc}
   */
  public function query() {
    return $this->select('source_table', 's')
      ->fields('s', [
      'id',
    ]);
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.