Skip to content

Commit

Permalink
Update README: v1.5 [Redis modules: RedisJSON, RediSearch, RedisBloom…
Browse files Browse the repository at this point in the history
…, RedisTimeSeries]
  • Loading branch information
Veirisa authored Mar 2, 2024
1 parent 1e58b51 commit 3d3b1b4
Showing 1 changed file with 47 additions and 30 deletions.
77 changes: 47 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Redis JDBC Driver

[![Apache licensed](https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg)](./LICENSE)
[![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)
[![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)
[![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)

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

## Connectivity

| Server | Status |
| ------------------- | ------------------- |
| Redis Standalone | ***Supported*** |
| Redis Cluster | ***Supported*** |
| Redis Sentinel | *Not supported yet* |
| Server | Status |
| ------------------- | -------------------------------------- |
| Redis Standalone | :white_check_mark: *Supported* |
| Redis Cluster | :white_check_mark: *Supported* |
| Redis Sentinel | :heavy_minus_sign: *Not supported yet* |

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

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

### Properties

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

### SSL

Set property `ssl=true`.
Set the property `ssl` to `true`.

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

To disable server certificate verification set property `verifyServerCertificate=false`.
### Port Forwarding

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

## Commands Execution
Example:
```
{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}
```

For using port forwarding with **Redis Standalone**, providing `hostAndPortMapping` **is not mandatory**.<br>

it is sufficient to specify `toHost` and `toPort` in the URL.

For using port forwarding with **Redis Cluster**, providing `hostAndPortMapping` **is mandatory**.<br>
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.

| Commands | Status |
| --------------- | ------------------- |
| Native | ***Supported*** |
| RedisBloom | *Not supported yet* |
| RediSearch | *Not supported yet* |
| RedisGraph | *Not supported yet* |
| RedisJSON | *Not supported yet* |
| RedisTimeSeries | *Not supported yet* |

## Sending Commands

| Commands | Status |
| --------------- | ------------------------------ |
| Native | :white_check_mark: *Supported* |
| RedisJSON | :white_check_mark: *Supported* |
| RediSearch | :white_check_mark: *Supported* |
| RedisBloom | :white_check_mark: *Supported* |
| RedisTimeSeries | :white_check_mark: *Supported* |


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

* [DataGrip 2022.3](https://www.jetbrains.com/datagrip/whatsnew/2022-3/): Redis support
+ [DataGrip 2022.3 EAP 2](https://blog.jetbrains.com/datagrip/2022/11/02/datagrip-2022-3-eap-2-redis-support/): Redis support (in details)
+ [DataGrip 2022.3.3](https://blog.jetbrains.com/datagrip/2023/01/12/datagrip-2022-3-3/): Connect to Redis with SSL/TLS enabled
* [DataGrip 2023.2](https://www.jetbrains.com/datagrip/whatsnew/2023-2/): Redis Cluster support
+ [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)

0 comments on commit 3d3b1b4

Please sign in to comment.