@Override
  public List<String> describeDatabases() {
    QueryResult result = executeQuery(this.influxDBService.query(SHOW_DATABASE_COMMAND_ENCODED));
    // {"results":[{"series":[{"name":"databases","columns":["name"],"values":[["mydb"]]}]}]}
    // Series [name=databases, columns=[name], values=[[mydb], [unittest_1433605300968]]]
    List<List<Object>> databaseNames = result.getResults().get(0).getSeries().get(0).getValues();
    List<String> databases = new ArrayList<>();
    if (databaseNames != null) {
      for (List<Object> database : databaseNames) {
        databases.add(database.get(0).toString());
      }
    }
    return databases;
  }
@ Override public List < String > describeDatabases ( ) { QueryResult result = executeQuery ( this . influxDBService . query ( SHOW_DATABASE_COMMAND_ENCODED ) ) ; List < List < Object > > databaseNames = result . getResults ( ) . get ( 0 ) . getSeries ( ) . get ( 0 ) . getValues ( ) ; List < String > databases = new ArrayList < > ( ) ; if ( databaseNames != null ) { for ( List < Object > database : databaseNames ) { databases . add ( database . get ( 0 ) . toString ( ) ) ; } } return databases ; }
{@inheritDoc}