I am looking for something like this:
update data
set data = new_data
where data.updated_at < new_data.updated_at
I can't find a solution for this problem, The close one is to use WATCH but unfortunately it can't watch for specific value condition.
If Redis can't do this, what is the issue here?
Comment From: mgravell
Usually, the easiest way to do that would be to use Lua (EVAL/EVALSHA). You can do it with WATChH, but getting it right is really really hard. With Lua: effortless
On Wed, 19 Aug 2020, 06:53 Altiano Gerung, notifications@github.com wrote:
I am looking for something like this:
update data set data = new_data where data.updated_at < new_data.updated_at
I can't find a solution for this problem, The close one is to use WATCH but unfortunately it can't watch for specific value condition.
If Redis can't do this, what is the issue here?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/redis/redis/issues/7680, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAEHMHGLN5YL5VAN7G46RTSBNSD3ANCNFSM4QER2M3A .
Comment From: itamarhaber
What @mgravell said :)
Closing this question - feel free to reopen if needed.