denodrivers / denodrivers/redis
Setting commands on a transaction returns a Promise
- Dominant language
- TypeScript
- Stars
- 464
- Forks
- 48
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 5
Description
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing redis.tx() and the transaction command methods such as lpush and expire, then compare their return values with flush(). The work is done when command calls support the requested chaining without breaking the existing transaction usage, with tests covering both return behavior and flushing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- redis, typescript
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100