Implementation:APIJSON APIJSON Demo RedisBuildData
| Knowledge Sources | |
|---|---|
| Domains | Database, Redis, Data_Mapping |
| Last Updated | 2026-10-14 00:00 GMT |
Overview
Concrete tool for mapping APIJSON table/column names to Redis data type operations (STRING, HASH, LIST, SET, ZSET) in the Redis demo, with extended command support including mset, hsetnx, persist, and rename.
Description
The RedisBuildData class mirrors Implementation:APIJSON_APIJSON_Demo_JedisBuildData but adds extended Redis command constants (mset, msetnx, hsetnx, persist, rename) for the standalone Redis (non-RediSQL) demo. It defines the same virtual table prefixes, column names, and operation method constants, enabling APIJSON CRUD on native Redis data types.
Usage
Reference this class when building APIJSON requests that perform Redis data type operations in the standalone Redis multi-datasource demo.
Code Reference
Source Location
- Repository: APIJSON_APIJSON_Demo
- File: APIJSON-Java-Server/APIJSONDemo-MultiDataSource-Redis/src/main/java/apijson/demo/redis/RedisBuildData.java
- Lines: 1-201
Signature
public class RedisBuildData {
public static final String REDIS_TABLE_KEY = "REDIS_TABLE_";
public static final String REDIS_STRING_KEY = "REDIS_STRING";
public static final String REDIS_HASH_KEY = "REDIS_HASH";
// ... same data type constants as JedisBuildData, plus:
public static final String OPTION_METHOD_MSET = "mset";
public static final String OPTION_METHOD_MSETNX = "msetnx";
public static final String OPTION_METHOD_HSETNX = "hsetnx";
public static final String OPTION_METHOD_PERSIST = "persist";
public static final String OPTION_METHOD_RENAME = "rename";
// ...
}
Import
import apijson.demo.redis.RedisBuildData;
I/O Contract
This is a constants class; see Implementation:APIJSON_APIJSON_Demo_JedisBuildData for the I/O contract pattern.
Usage Examples
See Implementation:APIJSON_APIJSON_Demo_JedisBuildData usage examples; the request format is identical.