Package me.axolotldev.dbconnector.driver
Class MySQLDriverData
-
- All Implemented Interfaces:
-
me.axolotldev.dbconnector.abstracts.database.DriverInfo
public final class MySQLDriverData implements DriverInfoMySQLDriverData represents the MySQL database driver information. It extends the DriverInfo abstract class and provides the necessary details and functions for MySQL database connections.
-
-
Field Summary
Fields Modifier and Type Field Description public final static MySQLDriverDataINSTANCEprivate final Stringnameprivate final StringdriverAddress
-
Method Summary
Modifier and Type Method Description StringgetName()StringgetDriverAddress()StringgenerateURI(DatabaseInfo info)Generates a JDBC connection URI string for MySQL using the given DatabaseInfo. BooleanisValidURI(String uri)Checks whether the given JDBC URI is valid and accepted by any loaded JDBC driver. -
-
Method Detail
-
getDriverAddress
String getDriverAddress()
-
generateURI
String generateURI(DatabaseInfo info)
Generates a JDBC connection URI string for MySQL using the given DatabaseInfo.
- Parameters:
info- the DatabaseInfo object containing host, port, database name, and additional connection options- Returns:
a formatted JDBC URI string in the form of jdbc:mysql://host:port/database?option1=value1&option2=value2
-
isValidURI
Boolean isValidURI(String uri)
Checks whether the given JDBC URI is valid and accepted by any loaded JDBC driver.
- Parameters:
uri- the JDBC URI string to validate- Returns:
true if any registered driver accepts the URI, false otherwise
-
-
-
-