Class MySQLDriverData

  • All Implemented Interfaces:
    me.axolotldev.dbconnector.abstracts.database.DriverInfo

    
    public final class MySQLDriverData
     implements DriverInfo
                        

    MySQLDriverData represents the MySQL database driver information. It extends the DriverInfo abstract class and provides the necessary details and functions for MySQL database connections.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getName()
      String getDriverAddress()
      String generateURI(DatabaseInfo info) Generates a JDBC connection URI string for MySQL using the given DatabaseInfo.
      Boolean isValidURI(String uri) Checks whether the given JDBC URI is valid and accepted by any loaded JDBC driver.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • 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