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