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