docs icon indicating copy to clipboard operation
docs copied to clipboard

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

This might also be a viable example:

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

clovergaze avatar Sep 12 '20 22:09 clovergaze