From e9beeeb88d4ae74021784a8dc7f197df10f473e9 Mon Sep 17 00:00:00 2001 From: Johannes Hillert Date: Sat, 12 Sep 2020 13:38:44 +0200 Subject: [PATCH] Adjusted documentation of dbList command (Java) * provided the correct return type * extended the example --- api/java/manipulating-databases/db_list.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/java/manipulating-databases/db_list.md b/api/java/manipulating-databases/db_list.md index 1704fddfa..cbc2a2b1c 100644 --- a/api/java/manipulating-databases/db_list.md +++ b/api/java/manipulating-databases/db_list.md @@ -12,7 +12,7 @@ related_commands: # Command syntax # {% apibody %} -r.dbList() → array +r.dbList() → DbList {% endapibody %} # Description # @@ -22,5 +22,9 @@ List all database names in the cluster. The result is a list of strings. __Example:__ List all databases. ```java -r.dbList().run(conn); +List dbList = r.dbList().run(connection, ArrayList.class).single(); + +if (dbList != null) { + dbList.forEach(System.out::println); +} ```