From 526723e0cb62e17b67fb0cd9d37c81b6300f6870 Mon Sep 17 00:00:00 2001 From: Anna Rodionova Date: Thu, 29 Jun 2023 21:00:49 +0200 Subject: [PATCH] Update README: v1.4 [Redis Cluster] --- README.md | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index ab2f218..70f5a51 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,14 @@ # 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.3) +[![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) [![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. This driver is embedded into [DataGrip](https://www.jetbrains.com/datagrip/). + ## Get The Driver ### Download @@ -26,6 +27,7 @@ gradlew.bat jar You will find driver jar in ```build/libs``` + ## Get Started ```java @@ -52,12 +54,13 @@ try (Connection connection = DriverManager.getConnection("jdbc:redis://localhost } ``` + ## Connectivity | Server | Status | | ------------------- | ------------------- | | Redis Standalone | ***Supported*** | -| Redis Cluster | *Not supported yet* | +| Redis Cluster | ***Supported*** | | Redis Sentinel | *Not supported yet* | Default host and port: ```127.0.0.1:6379``` @@ -69,21 +72,29 @@ Default host and port: ```127.0.0.1:6379``` jdbc:redis://[[:]@][[:]][/][?=&=&...] ``` +#### Redis Cluster +``` +jdbc:redis:cluster://[[:]@][[:],[:],...][/][?=&=&...] +``` + ### 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. | +| 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 | 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). | ### SSL + Set property `ssl=true`. Pass arguments for your keystore and trust store: @@ -97,8 +108,8 @@ Pass arguments for your keystore and trust store: To disable server certificate verification set property `verifyServerCertificate=false`. -## Commands Execution +## Commands Execution | Commands | Status | | --------------- | ------------------- | @@ -109,6 +120,7 @@ To disable server certificate verification set property `verifyServerCertificate | RedisJSON | *Not supported yet* | | RedisTimeSeries | *Not supported yet* | + ## Classes | Interface | Class | Comment | @@ -121,6 +133,7 @@ To disable server certificate verification set property `verifyServerCertificate |```java.sql.ResultSet``` |```jdbc.resultset.RedisResultSetBase```| | |```java.sql.ResultSetMetaData``` |```jdbc.resultset.RedisResultSetMetaData```| **Partial implementation**: it contains only information about columns. | + ## References * [DataGrip 2022.3](https://www.jetbrains.com/datagrip/whatsnew/2022-3/): Redis support