java.sql.Driverpublic class Driver
extends java.lang.Object
implements java.sql.Driver
Class.forName("virtuoso.jdbc4.Driver")
, or statically with the -Djdbc.drivers=virtuoso.jdbc4.Driver on the java
interpreter command line, or in the java properties files with an entry like
before.
Hints : Driver,
DriverManager,
VirtuosoConnection| Modifier and Type | Field | Description |
|---|---|---|
protected static int |
major |
|
protected static int |
minor |
| Constructor | Description |
|---|---|
Driver() |
Constructs a Virtuoso DBMS Driver instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
acceptsURL(java.lang.String url) |
Returns true if the driver thinks that it can open a connection
to the given URL.
|
java.sql.Connection |
connect(java.lang.String url,
java.util.Properties info) |
Attempts to make a database connection to the given URL.
|
int |
getMajorVersion() |
Gets the driver's major version number.
|
int |
getMinorVersion() |
Gets the driver's minor version number.
|
java.util.logging.Logger |
getParentLogger() |
Return the parent Logger of all the Loggers used by this driver.
|
java.sql.DriverPropertyInfo[] |
getPropertyInfo(java.lang.String url,
java.util.Properties info) |
Gets information about the possible properties for this driver.
|
boolean |
jdbcCompliant() |
Reports whether this driver is a genuine JDBC COMPLIANT driver.
|
static void |
main(java.lang.String[] args) |
|
protected java.util.Properties |
urlToInfo(java.lang.String url,
java.util.Properties _info) |
protected static final int major
protected static final int minor
public Driver()
throws java.sql.SQLException
Class.forName("virtuoso.jdbc4.Driver")
java.sql.SQLException - an error occurred in registeringpublic java.sql.Connection connect(java.lang.String url,
java.util.Properties info)
throws VirtuosoException
This function is only called through the DriverManager.getConnection function.jdbc:virtuoso://host:port, orjdbc:virtuoso://host:port/UID=username/PWD=userpassword
connect in interface java.sql.Driverurl - the URL of the database to which to connectinfo - a list of arbitrary string tag/value pairs as
connection arguments. Normally at least a "user" and
"password" property should be included.Connection object that represents a
connection to the URLVirtuosoException - it is the right
driver to connect to the given URL, but has trouble connecting to
the database.Driver.connect(java.lang.String, java.util.Properties)public boolean acceptsURL(java.lang.String url)
throws VirtuosoException
acceptsURL in interface java.sql.Driverurl - the URL of the databaseVirtuosoException - An internal error occurred.Driver.acceptsURL(java.lang.String)protected java.util.Properties urlToInfo(java.lang.String url,
java.util.Properties _info)
public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url,
java.util.Properties info)
throws VirtuosoException
The getPropertyInfo method is intended to allow a generic GUI tool to discover what properties it should prompt a human for in order to get enough information to connect to a database. Note that depending on the values the human has supplied so far, additional values may become necessary, so it may be necessary to iterate though several calls to getPropertyInfo.
getPropertyInfo in interface java.sql.Driverurl - the URL of the database to which to connectinfo - a proposed list of tag/value pairs that will be sent on
connect openVirtuosoException - An internal error occurred.Driver.getPropertyInfo(java.lang.String, java.util.Properties)public int getMajorVersion()
getMajorVersion in interface java.sql.Driverpublic int getMinorVersion()
getMinorVersion in interface java.sql.Driverpublic boolean jdbcCompliant()
jdbcCompliant in interface java.sql.Driverpublic static void main(java.lang.String[] args)
public java.util.logging.Logger getParentLogger()
throws java.sql.SQLFeatureNotSupportedException
getParentLogger in interface java.sql.Driverjava.sql.SQLFeatureNotSupportedException - if the driver does not use java.util.logging.