Example #1
0
 public function getList()
 {
     $connectionDb = $this->params('dbname');
     if (!($connection = $this->dbalConnections->findByDbName($connectionDb))) {
         return $this->getApiProblemResponse(404, 'Dbal connection can not be found');
     }
     $tables = $connection->connection()->getSchemaManager()->listTableNames();
     return new JsonModel(['payload' => array_map(function ($tablename) {
         return ["name" => $tablename];
     }, $tables)]);
 }
Example #2
0
 public function update($id, array $data)
 {
     $this->connectionManager->updateConnection($data);
     return $data;
 }