Skip to content

Commit 3d3b1b4

Browse files
authored
Update README: v1.5 [Redis modules: RedisJSON, RediSearch, RedisBloom, RedisTimeSeries]
1 parent 1e58b51 commit 3d3b1b4

File tree

1 file changed

+47
-30
lines changed

1 file changed

+47
-30
lines changed

README.md

Lines changed: 47 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Redis JDBC Driver
22

33
[![Apache licensed](https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg)](./LICENSE)
4-
[![Latest Release](https://img.shields.io/github/v/release/datagrip/redis-jdbc-driver?label=latest)](https://github.com/DataGrip/redis-jdbc-driver/releases/tag/v1.4)
4+
[![Latest Release](https://img.shields.io/github/v/release/datagrip/redis-jdbc-driver?label=latest)](https://github.com/DataGrip/redis-jdbc-driver/releases/tag/v1.5)
55
[![CI](https://github.com/datagrip/redis-jdbc-driver/workflows/CI/badge.svg?branch=main)](https://github.com/datagrip/redis-jdbc-driver/actions?query=workflow%3ACI+branch%3Amain)
66

77
Type 4 JDBC driver based on [Jedis](https://github.com/redis/jedis) that allows Java programs to connect to a Redis database.
@@ -57,11 +57,11 @@ try (Connection connection = DriverManager.getConnection("jdbc:redis://localhost
5757

5858
## Connectivity
5959

60-
| Server | Status |
61-
| ------------------- | ------------------- |
62-
| Redis Standalone | ***Supported*** |
63-
| Redis Cluster | ***Supported*** |
64-
| Redis Sentinel | *Not supported yet* |
60+
| Server | Status |
61+
| ------------------- | -------------------------------------- |
62+
| Redis Standalone | :white_check_mark: *Supported* |
63+
| Redis Cluster | :white_check_mark: *Supported* |
64+
| Redis Sentinel | :heavy_minus_sign: *Not supported yet* |
6565

6666
Default host and port: ```127.0.0.1:6379```
6767

@@ -79,23 +79,23 @@ jdbc:redis:cluster://[[<user>:]<password>@][<host1>[:<port1>],<host2>[:<port2>],
7979

8080
### Properties
8181

82-
| Property | Type | Default | Description |
83-
| ----------------------- | ------------------- | ------- | ----------------------------------- |
84-
| user | String | null | |
85-
| password | String | null | |
86-
| database | Integer | 0 | |
87-
| connectionTimeout | Integer | 2000 | Connection timeout in milliseconds. |
88-
| socketTimeout | Integer | 2000 | Socket timeout in milliseconds. |
89-
| blockingSocketTimeout | Integer | 0 | Socket timeout (in milliseconds) to use during blocking operation. Default is '0', which means to block forever. |
90-
| clientName | String | null | |
91-
| ssl | Boolean | false | Enable SSL. |
92-
| verifyServerCertificate | Boolean | true | Configure a connection that uses SSL but does not verify the identity of the server. |
93-
| hostAndPortMapping | Map<String, String> | null | Host and port mapping. |
94-
| verifyConnectionMode | Boolean | true | Verify that the mode specified for a connection in the URL prefix matches the server mode (standalone, cluster, sentinel). |
82+
| Property | Type | Default | Description |
83+
| ----------------------- | ------------------ | ------- | ----------------------------------- |
84+
| user | String | null | |
85+
| password | String | null | |
86+
| database | Integer | 0 | |
87+
| connectionTimeout | Integer | 2000 | Connection timeout in milliseconds. |
88+
| socketTimeout | Integer | 2000 | Socket timeout in milliseconds. |
89+
| blockingSocketTimeout | Integer | 0 | Socket timeout (in milliseconds) to use during blocking operation. Default is '0', which means to block forever. |
90+
| clientName | String | null | |
91+
| ssl | Boolean | false | Enable SSL. |
92+
| verifyServerCertificate | Boolean | true | Configure a connection that uses SSL but does not verify the identity of the server. |
93+
| hostAndPortMapping | Map<String,String> | null | |
94+
| verifyConnectionMode | Boolean | true | Verify that the mode specified for a connection in the URL prefix matches the server mode (standalone, cluster, sentinel). |
9595

9696
### SSL
9797

98-
Set property `ssl=true`.
98+
Set the property `ssl` to `true`.
9999

100100
Pass arguments for your keystore and trust store:
101101
```
@@ -105,20 +105,33 @@ Pass arguments for your keystore and trust store:
105105
-Djavax.net.ssl.keyStore=/path/to/client.keystore
106106
-Djavax.net.ssl.keyStorePassword=password123
107107
```
108+
To disable server certificate verification set the property `verifyServerCertificate=false`.
108109

109-
To disable server certificate verification set property `verifyServerCertificate=false`.
110+
### Port Forwarding
110111

112+
Set the property `hostAndPortMapping` to `{<toHost1>:<toPort1>=<fromHost1>:<fromHost1>, …}`.
111113

112-
## Commands Execution
114+
Example:
115+
```
116+
{172.18.0.2:6379=localhost:6372, 172.18.0.3:6379=localhost:6373, 172.18.0.4:6379=localhost:6374, 172.18.0.5:6379=localhost:6375, 172.18.0.6:6379=localhost:6376, 172.18.0.7:6379=localhost:6377}
117+
```
118+
119+
For using port forwarding with **Redis Standalone**, providing `hostAndPortMapping` **is not mandatory**.<br>
120+

it is sufficient to specify `toHost` and `toPort` in the URL.
121+
122+
For using port forwarding with **Redis Cluster**, providing `hostAndPortMapping` **is mandatory**.<br>
123+
The hosts and ports from the URL are used only for connection initialization, during which the hosts and ports of the cluster's nodes are obtained from the server. When sending commands, these obtained hosts and ports are transformed by applying `hostAndPortMapping` and then used.
113124

114-
| Commands | Status |
115-
| --------------- | ------------------- |
116-
| Native | ***Supported*** |
117-
| RedisBloom | *Not supported yet* |
118-
| RediSearch | *Not supported yet* |
119-
| RedisGraph | *Not supported yet* |
120-
| RedisJSON | *Not supported yet* |
121-
| RedisTimeSeries | *Not supported yet* |
125+
126+
## Sending Commands
127+
128+
| Commands | Status |
129+
| --------------- | ------------------------------ |
130+
| Native | :white_check_mark: *Supported* |
131+
| RedisJSON | :white_check_mark: *Supported* |
132+
| RediSearch | :white_check_mark: *Supported* |
133+
| RedisBloom | :white_check_mark: *Supported* |
134+
| RedisTimeSeries | :white_check_mark: *Supported* |
122135

123136

124137
## Classes
@@ -138,3 +151,7 @@ To disable server certificate verification set property `verifyServerCertificate
138151

139152
* [DataGrip 2022.3](https://www.jetbrains.com/datagrip/whatsnew/2022-3/): Redis support
140153
+ [DataGrip 2022.3 EAP 2](https://blog.jetbrains.com/datagrip/2022/11/02/datagrip-2022-3-eap-2-redis-support/): Redis support (in details)
154+
+ [DataGrip 2022.3.3](https://blog.jetbrains.com/datagrip/2023/01/12/datagrip-2022-3-3/): Connect to Redis with SSL/TLS enabled
155+
* [DataGrip 2023.2](https://www.jetbrains.com/datagrip/whatsnew/2023-2/): Redis Cluster support
156+
+ [DataGrip 2023.2 EAP 2](https://blog.jetbrains.com/datagrip/2023/07/06/datagrip-2023-2-eap-2-redis-cluster-new-schema-migration-dialog-and-more/): Redis Cluster support (in details)
157+

0 commit comments

Comments
 (0)