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 viaPreparedStatement. - Supports multi-command execution with results retrieved through standard JDBC methods.
- Supports
Statementproperties:maxRows,fetchSize,timeoutSec. - Supports command interceptors for logging, performance monitoring, and similar scenarios.
- Supports type conversion — for example, when result set returns
LONGtype, data can be retrieved viaResultSet.getIntorResultSet.getString. - Supports
BLOB,CLOB,NCLOBreading.
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.