跳到主要内容
版本:v3.0.x

currentUsedDatabase()

This operation returns the name of the database currently being used by this client.

Java
public String currentUsedDatabase()

RETURNS:

String

The name of the currently active database.

Example

Java
String dbName = client.currentUsedDatabase();
System.out.println("Current database: " + dbName);