rethinkdb / docs

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

Adjusted documentation of tableList command (Java) #1288

Open clovergaze opened 4 years ago

clovergaze commented 4 years ago

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

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

Checklist

clovergaze commented 4 years ago

This might also be a viable example:

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