Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions api/java/manipulating-tables/table_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@ related_commands:
# Command syntax #

{% apibody %}
db.tableList() → array
db.tableList() → TableList
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type should be ReQL type ('array')

{% 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@clovergaze why do we need to add the 'DEAULT_DB_NAME? The examples should be copy-paste snippets.


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