Driver
The database driver. An application should not use this class directly. The
only thing the application needs to do is load the driver. This can be done
using Class.forName. To load the driver and open a database connection, use
the following code:
Class.forName("org.h2.Driver");
Connection conn = DriverManager.getConnection(
"jdbc:h2:˜/test", "sa", "sa");
| Methods |
| boolean |
acceptsURL(String url)
Check if the driver understands this URL.
|
| boolean |
acceptsURL(String url)
Check if the driver understands this URL.
This method should not be called by an application.
Parameters:
url - the database URL
Returns:
if the driver understands the URL
|
| Connection |
connect(String url, Properties info)
Open a database connection.
|
| Connection |
connect(String url, Properties info) throws SQLException
Open a database connection.
This method should not be called by an application.
Instead, the method DriverManager.getConnection should be used.
Parameters:
url - the database URL
info - the connection properties
Returns:
the new connection or null if the URL is not supported
|
| int |
getMajorVersion()
Get the major version number of the driver.
|
| int |
getMajorVersion()
Get the major version number of the driver.
This method should not be called by an application.
Returns:
the major version number
|
| int |
getMinorVersion()
Get the minor version number of the driver.
|
| int |
getMinorVersion()
Get the minor version number of the driver.
This method should not be called by an application.
Returns:
the minor version number
|
| Logger |
getParentLogger()
[Not supported]
|
| Logger |
getParentLogger()
[Not supported]
|
| DriverPropertyInfo[] |
getPropertyInfo(String url, Properties info)
Get the list of supported properties.
|
| DriverPropertyInfo[] |
getPropertyInfo(String url, Properties info)
Get the list of supported properties.
This method should not be called by an application.
Parameters:
url - the database URL
info - the connection properties
Returns:
a zero length array
|
| boolean |
jdbcCompliant()
Check if this driver is compliant to the JDBC specification.
|
| boolean |
jdbcCompliant()
Check if this driver is compliant to the JDBC specification.
This method should not be called by an application.
Returns:
true
|