public class MDriver extends Object implements Driver
The url protocol is as follows:
For connecting to a remote database server: jdbc:mckoi:[//hostname[:portnum]/][schema_name/] eg. jdbc:mckoi://db.mckoi.com:7009/ If hostname is not provided then it defaults to localhost. If portnum is not provided it defaults to 9157. If schema_name is not provided it defaults to APP. To start up a database in the local file system the protocol is: jdbc:mckoi:local://databaseconfiguration/[schema_name/] eg. jdbc:mckoi:local://D:/dbdata/db.conf If schema_name is not provided it defaults to APP. To create a database in the local file system then you need to supply a 'create=true' assignment in the URL encoding. eg. jdbc:mckoi:local://D:/dbdata/db.conf?create=true
A local database runs within the JVM of this JDBC driver. To boot a local database, you must include the full database .jar release with your application distribution.
For connecting to a remote database using the remote URL string, only the JDBC driver need be included in the classpath.
NOTE: This needs to be a light-weight object, because a developer could generate multiple instances of this class. Making an instance of 'com.mckoi.JDBCDriver' will create at least two instances of this object.
Constructor and Description |
---|
MDriver()
Constructor is public so that instances of the JDBC driver can be
created by developers.
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsURL(String url) |
Connection |
connect(String url,
Properties info) |
int |
getMajorVersion() |
int |
getMinorVersion() |
Logger |
getParentLogger() |
DriverPropertyInfo[] |
getPropertyInfo(String url,
Properties info) |
boolean |
jdbcCompliant() |
static void |
register()
Static method that registers this driver with the JDBC driver manager.
|
public MDriver()
public static void register()
public Connection connect(String url, Properties info) throws SQLException
connect
in interface Driver
SQLException
public boolean acceptsURL(String url) throws SQLException
acceptsURL
in interface Driver
SQLException
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
getPropertyInfo
in interface Driver
SQLException
public int getMajorVersion()
getMajorVersion
in interface Driver
public int getMinorVersion()
getMinorVersion
in interface Driver
public boolean jdbcCompliant()
jdbcCompliant
in interface Driver
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger
in interface Driver
SQLFeatureNotSupportedException
Copyright © 2015. All rights reserved.