how to get all values in a list?

123 views
Skip to first unread message

Mr_Google

unread,
Jan 28, 2010, 8:54:58 AM1/28/10
to Redis DB
This may sound stupid :(

But how do you get the values in the list?

I tried 'GET mylist' and it returns 'Operation against a key holding
the wrong kind of value'

I read about LRANGE, but that one needs to know the count of the items
in the list.

Thanks all!

Searle Oliveira

unread,
Jan 28, 2010, 8:58:40 AM1/28/10
to redi...@googlegroups.com
LRANGE mylist 0 -1

this will be list all items in mylist...

:)


2010/1/28 Mr_Google <kah...@gmail.com>

--
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.




--
Searle Oliveira
MySQL DBA Sr (CMA Certificate ID 222572032)
con...@searle.com.br | +55 21 9408-5808
--
http://searle.com.br
http://code.google.com/p/redis-admin
--
http://twitter.com/searleoliveira
http://linkedin.com/in/searleoliveira

Mr_Google

unread,
Jan 28, 2010, 8:59:28 AM1/28/10
to Redis DB
LRANGE 0 -1 works to get the whole list. Is there any other ways?

Thanks!

Demis Bellot

unread,
Jan 28, 2010, 8:59:28 AM1/28/10
to redi...@googlegroups.com
LRANGE 0 -1

Demis Bellot

unread,
Jan 28, 2010, 9:01:55 AM1/28/10
to redi...@googlegroups.com
Sorry what did you want to do?
LRANGE is how you get the entire or part of a list.
You may want to look at LINDEX as well.

Reply all
Reply to author
Forward
0 new messages