--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
> Hi there,
>
> I try to use the following code to do a pipelined HGET, but the result is
> complicated Predis Object, not a list of values I need:
[...]
> $res = $pipe->exec();
You are calling the wrong method: $pipe->exec() enqueues the Redis
EXEC command into the pipeline (and returns the current pipeline
instance), when you want to send the enqueued commands to the server
and get the result array you must call $pipe->execute().
Cheers,
Daniele
--
Daniele Alessandri
http://clorophilla.net/
http://twitter.com/JoL1hAHN
You did not called multi, so you don't want exec as well.
If I understand correctly you are just interested in the pipelining,
not the atomicity of the multi hget operations.
So no exec() needed :)
Salvatore
--
Salvatore 'antirez' Sanfilippo
open source developer - VMware
http://invece.org
"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele
> Thanks Daniele, the exec() is not necessary anyway, I just call execute(),
> right?
Yes, exec() is only needed if you have previously issued a multi() command.
PS: when using pipelines with anonymous blocks (which is not your case
judging by the example you gave), you don't need to call execute() as
it is called implicitly by Predis.