rethinkdb / docs

RethinkDB documentation
http://rethinkdb.com/docs
Apache License 2.0
117 stars 167 forks source link

Adjusted documentation of dbList command (Java) #1289

Open clovergaze opened 4 years ago

clovergaze commented 4 years ago

Reason for the change I tried to get the list of database names from the server and the current documentation is not helpful in that regard. The specified return type is wrong and the array with database names had to be extracted from the Result<Object>.

Description I corrected the return type and added a useful example that shows how to get the database names.

Checklist

clovergaze commented 4 years ago

This might also be a viable example:

try (Result<Object> result = r.dbList().run(connection)) {
  result.forEach(list -> {
    ((List<?>) list).forEach(System.out::println);
  });
}