Hi,
Unfortunately there is none. It's not impossible though.
One approach would be to use a different redis connection for the ID
incrementing
and a different redis connection for doing an HMSET.
arr = [ { title: "Foo 1" }, { title: "Foo 2" } ]
r1 = Redis.connect
r2 = Redis.connect
r2.pipelined do
arr.each do |dict|
id = r1.incr "Post:id"
r2.hmset("Post:#{id}", *dict.flatten)
end
end
Something like that.
On Apr 30, 2:23 pm, Virendra Negi <
viren...@idyllic-software.com>
wrote: