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 TypeMethodDescriptionbooleanacceptsURL(String url) connect(String url, Properties props) intintgetPropertyInfo(String url, Properties info) boolean
-
Constructor Details
-
IgniteJdbcDriver
public IgniteJdbcDriver()
-
-
Method Details
-
connect
- Specified by:
connectin interfaceDriver- Throws:
SQLException
-
acceptsURL
- Specified by:
acceptsURLin interfaceDriver
-
getPropertyInfo
- Specified by:
getPropertyInfoin interfaceDriver- Throws:
SQLException
-
getMajorVersion
public int getMajorVersion()- Specified by:
getMajorVersionin interfaceDriver
-
getMinorVersion
public int getMinorVersion()- Specified by:
getMinorVersionin interfaceDriver
-
jdbcCompliant
public boolean jdbcCompliant()- Specified by:
jdbcCompliantin interfaceDriver
-
getParentLogger
- Specified by:
getParentLoggerin interfaceDriver- Throws:
SQLFeatureNotSupportedException
-