docs
docs copied to clipboard
Adjusted documentation of dbList command (Java)
- 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
- [x] I have read and agreed to the RethinkDB Contributor License Agreement
This might also be a viable example:
try (Result<Object> result = r.dbList().run(connection)) {
result.forEach(list -> {
((List<?>) list).forEach(System.out::println);
});
}