Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting commands on a transaction returns a Promise #259

Open
Strongbyte-ES opened this issue Sep 29, 2021 · 0 comments
Open

Setting commands on a transaction returns a Promise #259

Strongbyte-ES opened this issue Sep 29, 2021 · 0 comments
Labels
enhancement New feature or request future

Comments

@Strongbyte-ES
Copy link

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.

@uki00a uki00a added enhancement New feature or request future labels Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request future
Projects
None yet
Development

No branches or pull requests

2 participants