denodrivers/redis

Setting commands on a transaction returns a Promise

Strongbyte-ES opened this issue · 0 comments

We have e.g.:

const tx = redis.tx()
tx.lpush("list", string)
tx.expire("list", 60)
await tx.flush()

I'm unsure why e.g.tx.lpush returns a Promise uncesssarily as this is not an async operaion surely? I expected to return the transaction to enable chaining e.g.:

await redis.tx()
  .lpush("list", string)
  .expire("list", 60)
  .flush()

If i can assist with such improvements, let me know.