Skip to content

Commit 2402662

Browse files
author
aviau
committed
SHOW DATABASES now returns a databases serie
1 parent 728a488 commit 2402662

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

influxdb/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def get_list_database(self):
301301
"""
302302
Get the list of databases
303303
"""
304-
return list(self.query("SHOW DATABASES")['results'])
304+
return list(self.query("SHOW DATABASES")['databases'])
305305

306306
def create_database(self, dbname):
307307
"""

tests/influxdb/client_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,10 @@ def test_drop_database_fails(self):
350350
def test_get_list_database(self):
351351
data = {'results': [
352352
{'series': [
353-
{'values': [
354-
['new_db_1'],
355-
['new_db_2']],
353+
{'name': 'databases',
354+
'values': [
355+
['new_db_1'],
356+
['new_db_2']],
356357
'columns': ['name']}]}
357358
]}
358359

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy