Skip to content

Implement sendCommand inside multi context #3172

@LRagji

Description

@LRagji

Motivation

Can we have the sendCommand which accepts array of strings inside multi return context?, I want to abstract different redis libraries via single interface so that application code doesn't has to change according to different favourites out there a simple function like sendCommand does the trick but it is not present as soon as i start a multi context..
you can check 2 implementations below:

  1. ioredis: https://github.com/LRagji/redis-abstraction/blob/main/source/ioredis-client-pool.ts
  2. redis: https://github.com/LRagji/redis-abstraction/blob/main/source/redis-client-pool.ts

Basic Code Example

await x.multi()
        .sendCommands([['set', 'a', '1'], ['get', 'a']])
        .exec();

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions