Database.Redis.Internal
Description
This module processes requests and replies, and contains some utility
functions. The methods by which requests are processed are stylistically
modified versions of those found in Alexander Bogdanov's redis package,
which can be found on hackage at http://hackage.haskell.org/package/redis
- data RedisReply
- data ByteString
- request :: Handle -> [ByteString] -> IO (Maybe RedisReply)
- crlf :: String
- toUTF8 :: String -> ByteString
- fromUTF8 :: ByteString -> String
- pairsToList :: [(a, a)] -> [a]
Documentation
data RedisReply Source
Constructors
| RedisSingle ByteString | |
| RedisError ByteString | |
| RedisInteger Int | |
| RedisBulk [Maybe RedisReply] |
Instances
data ByteString
A space-efficient representation of a Word8 vector, supporting many
efficient operations. A ByteString contains 8-bit characters only.
Instances of Eq, Ord, Read, Show, Data, Typeable
Arguments
| :: Handle | |
| -> [ByteString] | list of requests |
| -> IO (Maybe RedisReply) |
Formats and sends the request
toUTF8 :: String -> ByteStringSource
Not strictly necessary, but adds readability
fromUTF8 :: ByteString -> StringSource
Not strictly necessary, but adds readability
pairsToList :: [(a, a)] -> [a]Source
Turns a list of pair tuples into a list