From f6530e03ca75fd5d5bc503cad976ba7f13fc3aa7 Mon Sep 17 00:00:00 2001 From: Johannes Hillert Date: Sat, 12 Sep 2020 13:31:13 +0200 Subject: [PATCH] Adjusted documentation of tableList command (Java) * provided the correct return type * extended the example --- api/java/manipulating-tables/table_list.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/api/java/manipulating-tables/table_list.md b/api/java/manipulating-tables/table_list.md index d62c54b87..02d3e594f 100644 --- a/api/java/manipulating-tables/table_list.md +++ b/api/java/manipulating-tables/table_list.md @@ -11,16 +11,19 @@ related_commands: # Command syntax # {% apibody %} -db.tableList() → array +db.tableList() → TableList {% endapibody %} # Description # List all table names in a database. The result is a list of strings. -__Example:__ List all tables of the 'test' database. +__Example:__ List all tables of the 'test' (`DEFAULT_DB_NAME`) database. ```java -r.db("test").tableList().run(conn); -``` +List tableList = r.db(DEFAULT_DB_NAME).tableList().run(connection, ArrayList.class).single(); +if (tableList != null) { + tableList.forEach(System.out::println); +} +```