public class Driver extends Object implements Driver
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.
|
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
|
static void |
unload()
INTERNAL
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParentLogger
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 static Driver load()
public static void unload()
public static void setDefaultConnection(Connection c)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.