You are here

protected function SqlImport::getCollections in MongoDB 8.2

List the collections in a database KV table.

Parameters

string $tableName: The name of the KV table.

Return value

\Drupal\Core\Database\StatementInterface A cursor to the individual collection names.

1 call to SqlImport::getCollections()
SqlImport::import in modules/mongodb_storage/src/Install/SqlImport.php
The command implementation for most-ikv: import the DB KV to MongoDB.

File

modules/mongodb_storage/src/Install/SqlImport.php, line 110

Class

SqlImport
Service providing the import of the SQL-based KV storage to MongoDB.

Namespace

Drupal\mongodb_storage\Install

Code

protected function getCollections(string $tableName) : StatementInterface {
  $cursor = $this->database
    ->select($tableName, 's')
    ->distinct()
    ->fields('s', [
    'collection',
  ])
    ->execute();
  return $cursor;
}