-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
base: master
Are you sure you want to change the base?
Conversation
* provided the correct return type * extended the example
This might also be a viable example: try (Result<Object> result = r.db(DEFAULT_DB_NAME).tableList().run(connection)) {
result.forEach(list -> {
((List<?>) list).forEach(System.out::println);
});
} |
{% 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. |
There was a problem hiding this comment.
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.
@@ -11,16 +11,19 @@ related_commands: | |||
# Command syntax # | |||
|
|||
{% apibody %} | |||
db.tableList() → array | |||
db.tableList() → TableList |
There was a problem hiding this comment.
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')
Reason for the change
I tried to simply get the list of table names in a database and the current documentation is not helpful in that regard. The specified return type is wrong and the array with table names had to be extracted from the
Result<Object>
.Description
I corrected the return type and added a useful example that shows how to really get the table names.
Checklist