Skip to main content

Introduction

Hint

This article is generated by AI translation.

jdbc-redis is a Redis JDBC driver adapter that allows developers to operate Redis data using standard JDBC interfaces and commands. Its purpose is to enable developers to seamlessly use Redis through the familiar JDBC programming model.

Core Features

  • JDBC compatible — implements standard JDBC interfaces for seamless integration with any JDBC-compatible framework.
  • Supports 140+ commonly used commands, covering DB, Server, Keys, List, Set, SortedSet, String, Hash command sets.
  • Supports command parameter placeholder ?, with parameters set via PreparedStatement.
  • Supports multi-command execution with results retrieved through standard JDBC methods.
  • Supports Statement properties: maxRows, fetchSize, timeoutSec.
  • Supports command interceptors for logging, performance monitoring, and similar scenarios.
  • Supports type conversion — for example, when result set returns LONG type, data can be retrieved via ResultSet.getInt or ResultSet.getString.
  • Supports BLOB, CLOB, NCLOB reading.

Architecture Design

jdbc-redis internally uses the official Redis driver for communication, parses commands via ANTLR4, and converts them to Redis API calls.

Use Cases

  • Accessing Redis in a unified way (JDBC) within Java projects.
  • Operating Redis using native command syntax.
  • Integrating Redis into existing JDBC-based data processing pipelines.