メインコンテンツまでスキップ

currentUsedDatabase()

Addedv2.6.xModifiedv2.6.x

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

public String currentUsedDatabase()

RETURNS:

String

The name of the currently active database.

Example

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