Package mindsdb.services
Class Databases
java.lang.Object
mindsdb.services.Databases
The Databases class provides methods to list, create, and drop databases.
Example usage:
// List all databases
databases.list();
// Get database by name
Database db = databases.get("example_db");
// Create a new database
Database db = databases.create("example_db", "postgres", Map.of("host", ""));
// Drop a database
databases.drop("example_db");
// Get an existing database
Database db = databases.get("example_db");
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Databases
Create a new Databases object- Parameters:
api
- - RestAPI object
-
-
Method Details
-
list
List all databases- Returns:
- List of databases
-
get
Get database by name- Parameters:
name
- - database name- Returns:
- Database object
-
create
Create a new database- Parameters:
name
- - database nameengine
- - database engineconnectionArgs
- - database connection arguments- Returns:
- Database object
-
drop
Drop database by name- Parameters:
name
- - database name
-