{"id":21306918,"url":"https://github.com/datagrip/redis-jdbc-driver","last_synced_at":"2026-01-07T15:14:54.353Z","repository":{"id":130138056,"uuid":"527960367","full_name":"DataGrip/redis-jdbc-driver","owner":"DataGrip","description":"Redis JDBC Driver","archived":false,"fork":false,"pushed_at":"2024-03-10T15:23:50.000Z","size":457,"stargazers_count":48,"open_issues_count":4,"forks_count":16,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-06T09:24:17.489Z","etag":null,"topics":["jdbc","redis"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DataGrip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-23T11:31:35.000Z","updated_at":"2025-03-27T03:01:25.000Z","dependencies_parsed_at":"2023-10-11T15:49:31.378Z","dependency_job_id":"94506f97-a60c-4bfe-b9df-a8242ad71e72","html_url":"https://github.com/DataGrip/redis-jdbc-driver","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/DataGrip/redis-jdbc-driver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataGrip%2Fredis-jdbc-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataGrip%2Fredis-jdbc-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataGrip%2Fredis-jdbc-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataGrip%2Fredis-jdbc-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DataGrip","download_url":"https://codeload.github.com/DataGrip/redis-jdbc-driver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataGrip%2Fredis-jdbc-driver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264902527,"owners_count":23681083,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jdbc","redis"],"created_at":"2024-11-21T16:28:51.510Z","updated_at":"2026-01-07T15:14:54.348Z","avatar_url":"https://github.com/DataGrip.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redis JDBC Driver\n\n[![Apache licensed](https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg)](./LICENSE)\n[![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)\n[![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)\n\nType 4 JDBC driver based on [Jedis](https://github.com/redis/jedis) that allows Java programs to connect to a Redis database.\n\nThis driver is embedded into [DataGrip](https://www.jetbrains.com/datagrip/).\n\n\n## Get The Driver\n\n### Download\n\nYou can download the precompiled driver (jar) on the [releases page](https://github.com/DataGrip/redis-jdbc-driver/releases).\n\n### Build\n\n```\n# Linux, MacOs\n./gradlew jar\n\n# Windows\ngradlew.bat jar\n```\n\nYou will find driver jar in ```build/libs```\n\n\n## Get Started\n\n```java\n// Load the driver\ntry {\n  Class.forName(\"jdbc.RedisDriver\");\n} catch (ClassNotFoundException e) {\n  e.printStackTrace();\n  return;\n}\n\n// Create a connection\ntry (Connection connection = DriverManager.getConnection(\"jdbc:redis://localhost:6379/0\", null, null)) {\n  // Execute a query\n  try (Statement statement = connection.createStatement()) {\n    try (ResultSet resultSet = statement.executeQuery(\"SET key value\")) {\n      // Process the result set\n      while (resultSet.next()) {\n        String result = resultSet.getString(\"value\");\n        System.out.println(\"result: \" + result);\n      }\n    }\n  }\n}\n```\n\n\n## Connectivity\n\n| Server              | Status                                 |\n| ------------------- | -------------------------------------- |\n| Redis Standalone    | :white_check_mark: *Supported*         |\n| Redis Cluster       | :white_check_mark: *Supported*         |\n| Redis Sentinel      | :heavy_minus_sign: *Not supported yet* |\n\nDefault host and port: ```127.0.0.1:6379```\n\n### URL templates\n\n#### Redis Standalone\n```\njdbc:redis://[[\u003cuser\u003e:]\u003cpassword\u003e@][\u003chost\u003e[:\u003cport\u003e]][/\u003cdatabase\u003e][?\u003cproperty1\u003e=\u003cvalue\u003e\u0026\u003cproperty2\u003e=\u003cvalue\u003e\u0026...]\n```\n\n#### Redis Cluster\n```\njdbc:redis:cluster://[[\u003cuser\u003e:]\u003cpassword\u003e@][\u003chost1\u003e[:\u003cport1\u003e],\u003chost2\u003e[:\u003cport2\u003e],...][/\u003cdatabase\u003e][?\u003cproperty1\u003e=\u003cvalue\u003e\u0026\u003cproperty2\u003e=\u003cvalue\u003e\u0026...]\n```\n\n### Properties\n\n| Property                | Type               | Default | Description                         |\n| ----------------------- | ------------------ | ------- | ----------------------------------- |\n| user                    | String             | null    |                                     |\n| password                | String             | null    |                                     |\n| database                | Integer            | 0       |                                     |\n| connectionTimeout       | Integer            | 2000    | Connection timeout in milliseconds. |\n| socketTimeout           | Integer            | 2000    | Socket timeout in milliseconds.     |\n| blockingSocketTimeout   | Integer            | 0       | Socket timeout (in milliseconds) to use during blocking operation. Default is '0', which means to block forever. |\n| clientName              | String             | null    |                                     |\n| ssl                     | Boolean            | false   | Enable SSL.                         |\n| verifyServerCertificate | Boolean            | true    | Configure a connection that uses SSL but does not verify the identity of the server. |\n| hostAndPortMapping      | Map\u003cString,String\u003e | null    |                                     |\n| verifyConnectionMode    | Boolean            | true    | Verify that the mode specified for a connection in the URL prefix matches the server mode (standalone, cluster, sentinel). |\n\n### SSL\n\nSet the property `ssl` to `true`.\n\nPass arguments for your keystore and trust store: \n```\n-Djavax.net.ssl.trustStore=/path/to/client.truststore\n-Djavax.net.ssl.trustStorePassword=password123\n# If you're using client authentication:\n-Djavax.net.ssl.keyStore=/path/to/client.keystore\n-Djavax.net.ssl.keyStorePassword=password123\n```\nTo disable server certificate verification set the property `verifyServerCertificate` to `false`.\n\n### Port Forwarding\n\nSet the property `hostAndPortMapping` to `{\u003ctoHost1\u003e:\u003ctoPort1\u003e=\u003cfromHost1\u003e:\u003cfromPort1\u003e, …}`.\n\nExample:\n```\n{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}\n```\n\nFor using port forwarding with **Redis Standalone**, providing `hostAndPortMapping` **is not mandatory**.\u003cbr\u003e \n\u2028it is sufficient to specify `fromHost` and `fromPort` in the URL.\n\nFor using port forwarding with **Redis Cluster**, providing `hostAndPortMapping` **is mandatory**.\u003cbr\u003e \nThe 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.\n\n\n## Sending Commands\n\n| Commands        | Status                         |\n| --------------- | ------------------------------ |\n| Native          | :white_check_mark: *Supported* |\n| RedisJSON       | :white_check_mark: *Supported* |\n| RediSearch      | :white_check_mark: *Supported* |\n| RedisBloom      | :white_check_mark: *Supported* |\n| RedisTimeSeries | :white_check_mark: *Supported* |\n\n\n## Classes\n\n| Interface                       | Class                           | Comment                                                                             |\n| ------------------------------- | ------------------------------- | ----------------------------------------------------------------------------------- |\n|```java.sql.Driver```            |```jdbc.RedisDriver```           |                                                                                     |\n|```java.sql.Connection```        |```jdbc.RedisConnection```       |                                                                                     |\n|```java.sql.Statement```         |```jdbc.RedisStatement```        |                                                                                     |\n|```java.sql.PreparedStatement``` |```jdbc.RedisPreparedStatement```| **Dummy implementation**: it is equivalent to ```jdbc.RedisStatement```.            |\n|```java.sql.DatabaseMetaData```  |```jdbc.RedisDatabaseMetaData``` | **Minimal implementation**: it does not contain information about database objects. |\n|```java.sql.ResultSet```         |```jdbc.resultset.RedisResultSetBase```|                                                                               |\n|```java.sql.ResultSetMetaData``` |```jdbc.resultset.RedisResultSetMetaData```| **Partial implementation**: it contains only information about columns.   |\n\n\n## References\n\n* [DataGrip 2022.3](https://www.jetbrains.com/datagrip/whatsnew/2022-3/): Redis support\n  +  [DataGrip 2022.3 EAP 2](https://blog.jetbrains.com/datagrip/2022/11/02/datagrip-2022-3-eap-2-redis-support/): Redis support (in details)\n  +  [DataGrip 2022.3.3](https://blog.jetbrains.com/datagrip/2023/01/12/datagrip-2022-3-3/): Connect to Redis with SSL/TLS enabled\n* [DataGrip 2023.2](https://www.jetbrains.com/datagrip/whatsnew/2023-2/): Redis Cluster support\n  +  [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)\n* [DataGrip 2024.1](https://www.jetbrains.com/datagrip/whatsnew/2024-1/): Redis Stack modules support\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatagrip%2Fredis-jdbc-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatagrip%2Fredis-jdbc-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatagrip%2Fredis-jdbc-driver/lists"}