go-rejson icon indicating copy to clipboard operation
go-rejson copied to clipboard

Call a command inside a transaction/pipe

Open luizvnasc opened this issue 5 years ago • 1 comments

Is there a way to use a rejson command inside a transaction or pipe? Something like that:

tx := redisClient.TXPipeline()
tx.XAdd(&redis.XAddArgs{Stream: stream.Name, ID: "*", Values: map[string]interface{}{"msg": "New stream"}})
tx.JSONSet(streamInfoKey(stream.Name), ".", stream)
tx.Exec()

luizvnasc avatar Jan 30 '20 11:01 luizvnasc

Currently, the go-rejson does not support transaction. You can follow the issue: #36 as there is a proposal for the same in it. You can share your thoughts and idea on it, we are open for PRs.

Shivam010 avatar Mar 17 '20 21:03 Shivam010