Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
git clone http://github.com/bnoguchi/redis/tree/sort_get_hash_all_keys
cd redis
make
sudo make install
make test
sudo redis-server
git clone http://github.com/bnoguchi/redis-rb/tree/sort_get_hash_all_keys
cd redis
ruby sample.rb
require "lib/redis"
r = Redis.new
r.hmset("items:1", "a", 1, "b", 2)
r.hmset("items:2", "a", 3, "b", 4)
r.hset("items:3", "we_can_use_any_hash_structure", "really!!")
r.lpush("list", 1)
r.lpush("list", 2)
r.lpush("list", 3)
r.sort("list", :by => "nosort", :get => "items:*")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment