Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gjt.mm.mysql.Driver
Constructor Summary | |
Driver()
Construct a new driver and register it with DriverManager |
Method Summary | |
boolean | acceptsURL(java.lang.String
Url)
Returns true if the driver thinks it can open a connection to the given URL. Typically, drivers will return true if they understand the subprotocol specified in the URL and false if they don't. |
java.sql.Connection | connect(java.lang.String
Url, java.util.Properties Info)
Try to make a database connection to the given URL. The driver should return "null" if it realizes it is the wrong kind of driver to connect to the given URL. This will be common, as when the JDBC driverManager is asked to connect to a given URL, it passes the URL to each loaded driver in turn. |
java.lang.String | database()
|
int | getMajorVersion()
Gets the drivers major version number |
int | getMinorVersion()
Get the drivers minor version number |
java.sql.DriverPropertyInfo[] | getPropertyInfo(java.lang.String
Url, java.util.Properties Info)
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. |
java.lang.String | host()
|
boolean | jdbcCompliant()
Report whether the driver is a genuine JDBC compliant driver. |
int | port()
|
java.lang.String | property(java.lang.String
Name)
|
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Constructor Detail |
public Driver() throws java.sql.SQLException
Method Detail |
public java.sql.Connection connect(java.lang.String Url, java.util.Properties Info) throws java.sql.SQLException
The driver should raise an SQLException if it is the right driver to connect to the given URL, but has trouble connecting to the database.
The java.util.Properties argument can be used to pass arbitrary string tag/value pairs as connection arguments. My protocol takes the form:
jdbc:mysql://host:port/database
url
- the URL of the database to connect to
info
- a list of arbitrary tag/value pairs as connection
arguments
public boolean acceptsURL(java.lang.String Url) throws java.sql.SQLException
url
- the URL of the driver
public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String Url, java.util.Properties Info) throws java.sql.SQLException
Note that depending on the values the human has supplied so far, additional values may become necessary, so it may be necessary to iterate through several calls to getPropertyInfo
url
- the Url of the database to connect to
info
- a proposed list of tag/value pairs that will be sent
on connect open.
public int getMajorVersion()
public int getMinorVersion()
public boolean jdbcCompliant()
MySQL is not SQL92 compliant
public java.lang.String host()
public int port()
public java.lang.String database()
public java.lang.String property(java.lang.String Name)
Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |