public function listDatabases($detailed = false)
    {
        $result = $this->connection->listDBs();

        if ($detailed) {
            return $result;
        }

        return array_map(
            function ($database) {
                return $database['name'];
            },
            $result['databases']
        );
    }