A TypeScript ORM for Redis that provides relational database features like multiple indexes, primary keys, unique keys, auto-increment, and aggregate functions (count, sum, min, max, average). Version 1.1.1 supports Redis 3, 4, and 5 via ioredis, but does not work with Redis Cluster. Breaking changes in v1 include all operations returning performance metrics and removal of soft delete and updatedAt/deletedAt columns. Designed for performance, creating ~10,000 entities per second per CPU process.
npm install ts-redis-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a simple entity with auto-increment id, unique name, and indexed age, then saves and retrieves it.
Destructure the result: const [entity, perf] = await Entity.create({}).save();Remove any usage of updatedAt, deletedAt columns and softDelete/restore methods from your code.
Use a standalone Redis server or consider alternative ORMs like ioredis-based solutions that support cluster.
Catch RedisOrmSchemaError and call entity.constructor.resync() or use the provided resync method.
Add "experimentalDecorators": true and "emitDecoratorMetadata": true to your tsconfig.json.
Ensure your class has @Entity decorator and extends BaseEntity.
Call await Entity.resync() to synchronize the schema with the data.
Use 'new MyEntity()' to create an instance.