Package org.apache.ignite.jdbc
Class IgniteJdbcDriver
java.lang.Object
org.apache.ignite.jdbc.IgniteJdbcDriver
- All Implemented Interfaces:
Driver
JDBC driver implementation for Apache Ignite 3.x.
The driver follows the following precedence (high priority goes first) for parameter value resolution: API arguments (if it available on
As example:
jdbc:ignite:thin://192.168.1.1:10800/public?connectionTimeout=1000&username=root&password=pwd &connectionTimeZone=GMT+1
Driver allows to get distributed data from Ignite 3 Data Storage using standard SQL queries and standard JDBC API.
Register the JDBC drivers
The JDBC driver registration is automatically done via the Java Standard Edition Service Provider mechanism. Ignite JDBC driver implements this feature and it is automatically registered for case the JDBC driver jar presents in classpath.
URL Format
The JDBC Driver supports the following URL formats to establish a connection with an Ignite 3 Database:
jdbc:ignite:thin://host[:port][,host[:port][/schema][[?parameter1=value1][¶meter2=value2],...]]
jdbc:ignite:thin://host[:port][,host[:port][/schema][[?parameter1=value1][;parameter2=value2],...]]
- host, port - network address of database. IPV4 and IPV6 supports both.
- schema - define schema used by default on the connection.
- URL can have an optional list of name-value pairs as parameters after the '?' delimiter.
Name and value are separated by an '=' and multiple properties are separated either by an '&' or a ';'.
Separate sign can't be mixed and should be either semicolon or ampersand sign.
Parameter Name | Description |
---|---|
Common properties | |
connectionTimeZone | Client connection time-zone ID. This property can be used by the client to change the time zone of the "session" on the server.
Affects the interpretation of dates in queries without specifying a time zone. If not set then system default on client timezone will be used. |
queryTimeout | Number of seconds the driver will wait for a Statement object to execute. Zero means there is no limits.
By default no any timeout. |
Connection properties | |
connectionTimeout | Number of milliseconds JDBC client will waits for server to response. Zero means there is no limits.
By default no any timeout. |
Basic authentication | |
username | Username to login by basic authentication. |
password | Password to login by basic authentication. |
SSL security | |
sslEnabled | Enable ssl. Possible values:
|
trustStorePath | Path to trust store on client side. |
trustStorePassword | Trust store password. |
keyStorePath | Path to key store on client side. |
keyStorePassword | Key store password. |
clientAuth | SSL client authentication. Supported values:
|
ciphers | SSL ciphers list separated by comma ','. |
The driver follows the following precedence (high priority goes first) for parameter value resolution: API arguments (if it available on
Connection
object), last instance in the connection string, properties object passed during connection.
As example:
jdbc:ignite:thin://192.168.1.1:10800/public?connectionTimeout=1000&username=root&password=pwd &connectionTimeZone=GMT+1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptsURL
(String url) connect
(String url, Properties props) int
int
getPropertyInfo
(String url, Properties info) boolean
-
Constructor Details
-
IgniteJdbcDriver
public IgniteJdbcDriver()
-
-
Method Details
-
connect
- Specified by:
connect
in interfaceDriver
- Throws:
SQLException
-
acceptsURL
- Specified by:
acceptsURL
in interfaceDriver
-
getPropertyInfo
- Specified by:
getPropertyInfo
in interfaceDriver
- Throws:
SQLException
-
getMajorVersion
public int getMajorVersion()- Specified by:
getMajorVersion
in interfaceDriver
-
getMinorVersion
public int getMinorVersion()- Specified by:
getMinorVersion
in interfaceDriver
-
jdbcCompliant
public boolean jdbcCompliant()- Specified by:
jdbcCompliant
in interfaceDriver
-
getParentLogger
- Specified by:
getParentLogger
in interfaceDriver
- Throws:
SQLFeatureNotSupportedException
-