docs icon indicating copy to clipboard operation
docs copied to clipboard

Adjusted documentation of tableList command (Java)

Open clovergaze opened this issue 5 years ago • 1 comments

  • provided the correct return type
  • extended the example

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 avatar Sep 12 '20 11:09 clovergaze

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);
  });
}

clovergaze avatar Sep 12 '20 22:09 clovergaze