Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 535 Bytes

File metadata and controls

30 lines (23 loc) · 535 Bytes
layout api-command
language Java
permalink api/java/db_list/
command dbList
related_commands
dbCreate dbDrop tableCreate
db_create/
db_drop/
table_create/

Command syntax

{% apibody %} r.dbList() → DbList {% endapibody %}

Description

List all database names in the cluster. The result is a list of strings.

Example: List all databases.

List<?> dbList = r.dbList().run(connection, ArrayList.class).single();

if (dbList != null) {
    dbList.forEach(System.out::println);
}