A fully typed Node.js library (v0.6.14, stable API) that adds a relational layer on top of Redis, supporting foreign keys, indexes, and queries that combine multiple records. It provides TypeScript generics for collection schemas and uses handy-redis as the Redis client. Compared to raw Redis or ioredis, it offers higher-level CRUD operations and type safety but lacks atomicity and transactions (planned). The library is lightweight, with no additional server-side requirements beyond Redis itself.
npm install relational-redis-storeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up a relational Redis store with typed collections, inserts a user and a game with foreign keys, and retrieves the game.
Ensure referenced items exist before inserting and manually handle deletions.
Use handy-redis or create a compatible client.
Consider wrapping ioredis to mimic handy-redis interface or wait for library update.
Use MULTI/EXEC manually via the client if atomicity needed.
Define and pass a correct CollectionMap type matching your data.
Pin to exact version and review changelog before upgrading.
Start Redis (e.g., `redis-server`) and ensure REDIS_URL is correct (e.g., redis://localhost:6379).
Replace `import { Store } from 'relational-redis-store'` with `import Store from 'relational-redis-store'`.Insert the referenced item before adding the item with foreign keys.
Ensure collection name matches a key in your CollectionMap type (e.g., 'users').