I’m writing a configuration entity modul in drupal 9. I wish to record all tables, from an exterior database (postgis) in Drupal Developer schema known as gi. Drupal Developer change between Drupal Developer databases is not any downside. I am looking for a means, to solely get Drupal Developer title of Drupal Developer desk known as gruenzuege to place this in a markup type.
//Drupal Developer type the place to save lots of Drupal Developer desk
$type['tables'] = [ '#type' => 'fieldset', '#title' => $this->t('Tables'), '#collapsible' => TRUE, // Added '#collapsed' => FALSE, // Added ];
//Exterior Database connection
$postgis_database = array( 'database' => $drugis_postgis_connection->getdatabase(), 'username' => $drugis_postgis_connection->getusername(), 'password' => $drugis_postgis_connection->getpassword(), 'host' => $drugis_postgis_connection->gethost(), 'driver' => 'pgsql' ); Database::addConnectionInfo('postgis', 'default', $postgis_database); Database::setActiveConnection('default', 'postgis');
//instance for fetching desk:gruenzuege in drupal
$outcomes = Database::getConnection('default', 'postgis')->question('SELECT * FROM "gi"."gruenzuege"')->fetchAll(); dpm($outcomes);
I do not perceive easy methods to question to a different schema, to get solely, Drupal Developer desk names of Drupal Developer schema gi? It’s truly Drupal Developer solely desk. Thanks for assist