Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjusted documentation of tableList command (Java) #1288

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 7 additions & 4 deletions api/java/manipulating-tables/table_list.md
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);
}
```