Commits

Alvaro Videla committed 5ec580a

Comments (0)

Files changed (1)

-== Welcome ==
-
-Welcome to your wiki! This is the default page we've installed for your convenience. Go ahead and edit it.
-
-=== Wiki features ===
-
-This wiki uses the [[http://www.wikicreole.org/|Creole]] syntax, and is fully compatible with the 1.0 specification.
-
-The wiki itself is actually a hg repository, which means you can clone it, edit it locally/offline, add images or any other file type, and push it back to us. It will be live immediately.
-
-Go ahead and try:
-
-{{{
-$ hg clone http://bitbucket.org/videlalvaro/redis-haskell/wiki/
-}}}
-
-Wiki pages are normal files, with the .wiki extension. You can edit them locally, as well as creating new ones.
-
-=== Syntax highlighting ===
-
-You can also highlight snippets of text, we use the excellent [[http://www.pygments.org/|Pygments]] library.
-
-Here's an example of some Python code:
-
-{{{
-#!python
-
-def wiki_rocks(text):
-	formatter = lambda t: "funky"+t
-	return formatter(text)
-}}}
-
-You can check out the source of this page to see how that's done, and make sure to bookmark [[http://pygments.org/docs/lexers/|the vast library of Pygment lexers]], we accept the 'short name' or the 'mimetype' of anything in there.
-
-Have fun!
+== Redit Haskell ==
+
+This are the Haskell bindings for Redis
+
+=== Installation ===
+
+{{{
+$ hg clone http://bitbucket.org/videlalvaro/redis-haskell/
+$ cd redis-haskell
+$ runghc Setup configure -p
+$ runghc Setup build
+runghc Setup install
+}}}
+
+If the build step complains about missing profiling files then try configuring with the following command:
+
+{{{
+$ runghc Setup configure -p --disable-library-profiling
+}}}
+
+See the files **RedisTest.hs** and **StringsExamples.hs** for some examples on the usage
+
+=== Implemented Commands ===
+
+The following is the list of supported commands:
+
+{{{
+  get :: (Key k, Serializable s) => a -> k -> IO (Maybe s)
+  set :: (Key k, Serializable s) => a -> k -> s -> IO (Bool)
+  setnx :: (Key k, Serializable s) => a -> k -> s -> IO (Bool)
+  getset :: (Key k, Serializable s) => a -> k -> s -> IO (Maybe s)
+  mget :: (Key k, Serializable s) => a -> [k] -> IO (Maybe [Maybe s])
+  incr :: (Key k) => a -> k -> IO (Maybe Int)
+  decr :: (Key k) => a -> k -> IO (Maybe Int)
+  incrby :: (Key k) => a -> k -> Int -> IO (Maybe Int)
+  decrby :: (Key k) => a -> k -> Int -> IO (Maybe Int)
+  exists :: (Key k) => a -> k -> IO (Bool)
+  del :: (Key k) => a -> k -> IO (Bool)
+  rtype :: (Key k) => a -> k -> IO (Maybe String)
+
+  keys :: a -> String -> IO (Maybe [String])
+  randomkey :: a -> IO (Maybe String)
+  rename :: (Key k) => a -> k -> k -> IO (Bool)
+  renamenx :: (Key k) => a -> k -> k -> IO (Bool)
+  dbsize :: a -> IO (Maybe Int)
+  expire :: (Key k) => a -> k -> Int -> IO (Bool)
+  ttl    :: (Key k) => a -> k -> IO (Maybe Int)
+         
+  lrange :: (Key k, Serializable s) => a -> k -> Int -> Int -> IO (Maybe [Maybe s])
+  lpush, rpush :: (Key k, Serializable s) => a -> k -> s -> IO (Bool)
+  llen :: (Key k) => a -> k -> IO (Maybe Int)
+  ltrim :: (Key k) => a -> k -> Int -> Int -> IO (Bool)
+  lindex :: (Key k, Serializable s) => a -> k -> Int -> IO (Maybe s)
+  lset :: (Key k, Serializable s) => a -> k -> Int -> s -> IO (Bool)
+  lrem :: (Key k, Serializable s) => a -> k -> Int -> s -> IO (Maybe Int)
+  lpop, rpop :: (Key k, Serializable s) => a -> k -> IO (Maybe s)
+  
+  sadd :: (Key k, Serializable s) => a -> k -> s -> IO (Bool)
+  srem :: (Key k, Serializable s) => a -> k -> s -> IO (Bool)
+  spop :: (Key k, Serializable s) => a -> k -> IO (Maybe s)
+  smove :: (Key k, Serializable s) => a -> k -> k -> s -> IO (Bool)
+  scard :: (Key k) => a -> k -> IO (Maybe Int)
+  sismember :: (Key k, Serializable s) => a -> k -> s -> IO (Bool)
+  sinter :: (Key k, Serializable s) => a -> [k] -> IO (Maybe [Maybe s])
+  sunion :: (Key k, Serializable s) => a -> [k] -> IO (Maybe [Maybe s])
+  sdiff :: (Key k, Serializable s) => a -> [k] -> IO (Maybe [Maybe s])
+  sinterstore :: (Key k) => a -> k -> [k] -> IO (Maybe Int)
+  sunionstore :: (Key k) => a -> k -> [k] -> IO (Maybe Int)
+  sdiffstore :: (Key k) => a -> k -> [k] -> IO (Maybe Int)
+  smembers :: (Key k, Serializable s) => a -> k -> IO (Maybe [Maybe s])
+  srandmember :: (Key k, Serializable s) => a -> k -> IO (Maybe s)
+  
+  zadd :: (Key k, Serializable s) => a -> k -> Int -> s -> IO (Bool)
+  zrem :: (Key k, Serializable s) => a -> k -> s -> IO (Bool)
+  zrange, zrevrange, zrangebyscore :: (Key k, Serializable s) => a -> k -> Int -> Int -> IO (Maybe [Maybe s])
+  zcard :: (Key k) => a -> k -> IO (Maybe Int)
+  zscore :: (Key k, Serializable s) => a -> k -> s -> IO (Maybe String)
+  
+  select :: a -> Int -> IO (Bool)
+  move :: (Key k) => a -> k -> Int -> IO (Bool)
+  flushdb, flushall :: a -> IO (Bool)
+  
+  save, bgsave, shutdown :: a -> IO (Bool)
+  lastsave :: a -> IO (Maybe Int)
+  
+  pong :: a -> IO (Maybe String)
+  
+  info :: a -> IO (Maybe [String])
+  slaveoff :: a -> IO (Bool)
+  slaveoff' :: a -> String -> Int -> IO (Bool)
+}}}
+
+=== STATUS ===
+
+This code is should be considered ALPHA, is the first release of the package, so handle with care. Also the the API may change, since I want to code it in a more //haskelish// way. I also want to try using the network-bytestring to see if the performance of the library get improved.
+
+Since I'm Haskell beginner, any improvements or comments are welcomed.
+