|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.Driver
public class 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");
Constructor Summary | |
---|---|
Driver()
|
Method Summary | |
---|---|
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.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 |
unload()
INTERNAL |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Driver()
Method Detail |
---|
public java.sql.Connection connect(java.lang.String url, java.util.Properties info) throws java.sql.SQLException
connect
in interface java.sql.Driver
url
- the database URLinfo
- the connection properties
java.sql.SQLException
public boolean acceptsURL(java.lang.String url)
acceptsURL
in interface java.sql.Driver
url
- the database URL
public int getMajorVersion()
getMajorVersion
in interface java.sql.Driver
public int getMinorVersion()
getMinorVersion
in interface java.sql.Driver
public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties info)
getPropertyInfo
in interface java.sql.Driver
url
- the database URLinfo
- the connection properties
public boolean jdbcCompliant()
jdbcCompliant
in interface java.sql.Driver
public static Driver load()
public static void unload()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |