public class Driver extends java.lang.Object implements java.sql.Driver, JdbcDriverBackwardsCompat
Class.forName("org.h2.Driver");
Connection conn = DriverManager.getConnection(
"jdbc:h2:˜/test", "sa", "sa");
| Constructor and Description |
|---|
Driver() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsURL(java.lang.String url)
Check if the driver understands this URL.
|
java.sql.Connection |
connect(java.lang.String url,
java.util.Properties info)
Open a database connection.
|
int |
getMajorVersion()
Get the major version number of the driver.
|
int |
getMinorVersion()
Get the minor version number of the driver.
|
java.util.logging.Logger |
getParentLogger()
[Not supported]
|
java.sql.DriverPropertyInfo[] |
getPropertyInfo(java.lang.String url,
java.util.Properties info)
Get the list of supported properties.
|
boolean |
jdbcCompliant()
Check if this driver is compliant to the JDBC specification.
|
static Driver |
load()
INTERNAL
|
static void |
setDefaultConnection(java.sql.Connection c)
INTERNAL
Sets, on a per-thread basis, the default-connection for
user-defined functions.
|
static void |
setThreadContextClassLoader(java.lang.Thread thread)
INTERNAL
|
static void |
unload()
INTERNAL
|
public java.sql.Connection connect(java.lang.String url,
java.util.Properties info)
throws java.sql.SQLException
connect in interface java.sql.Driverurl - the database URLinfo - the connection propertiesjava.sql.SQLExceptionpublic boolean acceptsURL(java.lang.String url)
acceptsURL in interface java.sql.Driverurl - the database URLpublic int getMajorVersion()
getMajorVersion in interface java.sql.Driverpublic int getMinorVersion()
getMinorVersion in interface java.sql.Driverpublic java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url,
java.util.Properties info)
getPropertyInfo in interface java.sql.Driverurl - the database URLinfo - the connection propertiespublic boolean jdbcCompliant()
jdbcCompliant in interface java.sql.Driverpublic java.util.logging.Logger getParentLogger()
getParentLogger in interface java.sql.Driverpublic static Driver load()
public static void unload()
public static void setDefaultConnection(java.sql.Connection c)
public static void setThreadContextClassLoader(java.lang.Thread thread)