public class Driver extends Object implements 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(String url)
Check if the driver understands this URL.
|
Connection |
connect(String url,
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.
|
Logger |
getParentLogger()
[Not supported]
|
DriverPropertyInfo[] |
getPropertyInfo(String url,
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(Connection c)
INTERNAL
Sets, on a per-thread basis, the default-connection for
user-defined functions.
|
static void |
setThreadContextClassLoader(Thread thread)
INTERNAL
|
static void |
unload()
INTERNAL
|
public Connection connect(String url, Properties info) throws SQLException
connect
in interface Driver
url
- the database URLinfo
- the connection propertiesSQLException
public boolean acceptsURL(String url)
acceptsURL
in interface Driver
url
- the database URLpublic int getMajorVersion()
getMajorVersion
in interface Driver
public int getMinorVersion()
getMinorVersion
in interface Driver
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info)
getPropertyInfo
in interface Driver
url
- the database URLinfo
- the connection propertiespublic boolean jdbcCompliant()
jdbcCompliant
in interface Driver
public Logger getParentLogger()
getParentLogger
in interface Driver
public static Driver load()
public static void unload()
public static void setDefaultConnection(Connection c)
public static void setThreadContextClassLoader(Thread thread)
Copyright © 2017 JBoss by Red Hat. All rights reserved.