Package org.mariadb.jdbc
Class Driver
- java.lang.Object
-
- org.mariadb.jdbc.Driver
-
-
Constructor Summary
Constructors Constructor Description Driver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptsURL(String url)returns true if the driver can accept the url.Connectionconnect(String url, Properties props)Connect to the given connection string.static Connectionconnect(Configuration configuration)Connect according to configurationintgetMajorVersion()gets the major version of the driver.intgetMinorVersion()gets the minor version of the driver.LoggergetParentLogger()DriverPropertyInfo[]getPropertyInfo(String url, Properties info)Get the property info.booleanjdbcCompliant()checks if the driver is jdbc compliant.
-
-
-
Method Detail
-
connect
public static Connection connect(Configuration configuration) throws SQLException
Connect according to configuration- Parameters:
configuration- configuration- Returns:
- a Connection
- Throws:
SQLException- if connect fails
-
connect
public Connection connect(String url, Properties props) throws SQLException
Connect to the given connection string.- Specified by:
connectin interfaceDriver- Parameters:
url- the url to connect to- Returns:
- a connection
- Throws:
SQLException- if it is not possible to connect
-
acceptsURL
public boolean acceptsURL(String url)
returns true if the driver can accept the url.- Specified by:
acceptsURLin interfaceDriver- Parameters:
url- the url to test- Returns:
- true if the url is valid for this driver
-
getPropertyInfo
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
Get the property info.- Specified by:
getPropertyInfoin interfaceDriver- Parameters:
url- the url to get properties forinfo- the info props- Returns:
- all possible connector options
- Throws:
SQLException- if there is a problem getting the property info
-
getMajorVersion
public int getMajorVersion()
gets the major version of the driver.- Specified by:
getMajorVersionin interfaceDriver- Returns:
- the major versions
-
getMinorVersion
public int getMinorVersion()
gets the minor version of the driver.- Specified by:
getMinorVersionin interfaceDriver- Returns:
- the minor version
-
jdbcCompliant
public boolean jdbcCompliant()
checks if the driver is jdbc compliant.- Specified by:
jdbcCompliantin interfaceDriver- Returns:
- true since the driver is not compliant
-
getParentLogger
public Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
getParentLoggerin interfaceDriver- Throws:
SQLFeatureNotSupportedException
-
-