SqlCountCache.php in Drupal 10
File
core/modules/migrate/tests/modules/migrate_sql_count_cache_test/src/Plugin/migrate/source/SqlCountCache.php
View source
<?php
namespace Drupal\migrate_sql_count_cache_test\Plugin\migrate\source;
use Drupal\migrate\Plugin\migrate\source\SqlBase;
class SqlCountCache extends SqlBase {
public function fields() {
return [
'id' => t('Id'),
];
}
public function getIds() {
return [
'id' => [
'type' => 'integer',
],
];
}
public function query() {
return $this
->select('source_table', 's')
->fields('s', [
'id',
]);
}
}