| Modifier and Type | Field and Description |
|---|---|
protected Connection |
conn |
static int |
MAJORVERSION |
static boolean |
sharedCache |
static String |
vfs |
| Constructor and Description |
|---|
JDBCDriver() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsURL(String url)
Returns whether the driver thinks that it can open a connection to the
given URL.
|
Connection |
connect(String url,
Properties info)
Attempts to make a database connection to a data source specified by a
supplied URL.
|
int |
getMajorVersion()
Gets the driver's major version number.
|
int |
getMinorVersion()
Gets the driver's minor version number.
|
DriverPropertyInfo[] |
getPropertyInfo(String url,
Properties info)
Gets information about possible properties for this driver.
|
boolean |
jdbcCompliant()
Reports whether this driver is a genuine JDBC CompliantTM driver.
|
public static final int MAJORVERSION
public static boolean sharedCache
public static String vfs
protected Connection conn
public boolean acceptsURL(String url) throws SQLException
DriveracceptsURL in interface Driverurl - the URL to connect to.true if the driver thinks that is can open a connection
to the supplied URL, false otherwise. Typically, the
driver will respond true if it thinks that it can handle
the subprotocol specified by the driver.SQLException - if a database error occurs.public Connection connect(String url, Properties info) throws SQLException
Driverconnect in interface Driverurl - the URL to connect.info - some properties that should be used in establishing the
connection. The properties consist of name/value pairs of
strings. Normally, a connection to a database requires at
least two properties - for "user" and "password" in order to pass authentication to the database.SQLException - if a database error occurs.public int getMajorVersion()
DrivergetMajorVersion in interface Driverpublic int getMinorVersion()
DrivergetMinorVersion in interface Driverpublic DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
DriverThis method is intended to provide a listing of possible properties that the client of the driver must supply in order to establish a connection to a database. Note that the returned array of properties may change depending on the supplied list of property values.
getPropertyInfo in interface Driverurl - the URL of the database. An application may call this method
iteratively as the property list is built up - for example,
when displaying a dialog to an end-user as part of the
database login process.info - a set of tag/value pairs giving data that a user may be
prompted to provide in order to connect to the database.DriverPropertyInfo records which provide
details on which additional properties are required (in addition
to those supplied in the info parameter) in order to
connect to the database.SQLException - if a database error occurs.public boolean jdbcCompliant()
Drivertrue if it passes all the JDBC compliance
tests.
A driver may not be fully compliant if the underlying database has limited functionality.
jdbcCompliant in interface Drivertrue if the driver is fully JDBC compliant, false
otherwise.