denodrivers/redis

BREAKING: Stop exposing `Redis.executor`

uki00a opened this issue · 0 comments

deno-redis provides CommandExecutor as a low-level interface to Redis and it can be accessed via Redis.executor:

export interface Redis extends RedisCommands {
  readonly executor: CommandExecutor;
  readonly isClosed: boolean;
  readonly isConnected: boolean;
  close(): void;
}

However, I haven't fully thought the interface of CommandExecutor yet, so there is a possibility that breaking changes will be made to it in the future. I'd like to prevent such incompatible changes as much as possible.

For this reason, I' m planning to treat CommandExecutor as an internal API at the v1 release.

As an alternative I'll add the following method to Redis interface:

export interface Redis extends RedisCommands {
  sendCommand(command: string, ...args: RedisValue[]): Promise<RedisReply>;
  // or
  exec(command: string, ...args: RedisValue[]): Promise<RedisReply>;
}

Related to #237 and #253