nitishm / go-rejson

Golang client for redislabs' ReJSON module with support for multilple redis clients (redigo, go-redis)
MIT License
343 stars 47 forks source link

Call a command inside a transaction/pipe #41

Open luizvnasc opened 4 years ago

luizvnasc commented 4 years ago

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()
Shivam010 commented 4 years ago

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.