| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell98 |
Network.Memcache.Op
Description
For farther information, please see https://github.com/memcached/memcached/blob/master/doc/protocol.txt
- storage -
set,add,replace,appendorprepend - retrieval -
getandgets - deletion -
delete - increment decrement -
incranddecr - touch -
touch - stats
- other commands -
flush_all,version,quit
- data Option = Noreply
- data Op
- = SetOp !ByteString !Word32 !Word64 !BytesT ValueT ![Option]
- | CasOp !ByteString !Word32 !Word64 !BytesT !Word64 ValueT ![Option]
- | AddOp !ByteString !Word32 !Word64 !BytesT ValueT ![Option]
- | ReplaceOp !ByteString !Word32 !Word64 !BytesT ValueT ![Option]
- | AppendOp !ByteString !Word32 !Word64 !BytesT ValueT ![Option]
- | PrependOp !ByteString !Word32 !Word64 !BytesT ValueT ![Option]
- | GetOp ![ByteString]
- | GetsOp ![ByteString]
- | DeleteOp !ByteString ![Option]
- | IncrOp !ByteString !Word64 ![Option]
- | DecrOp !ByteString !Word64 ![Option]
- | TouchOp !ByteString !Word64 ![Option]
- | PingOp
- | FlushAllOp
- | VersionOp
- | QuitOp
- | StatsOp ![ByteString]
- isWriteOp :: Op -> Bool
- isReadOp :: Op -> Bool
- isNoreplyOp :: Op -> Bool
- isStorageOp :: Op -> Bool
- toOption :: ByteString -> Maybe Option
- toOptions :: [ByteString] -> Maybe [Option]
- keyOf :: Op -> Maybe ByteString
- bytesOf :: Op -> Maybe BytesT
- parseOp :: ByteString -> Maybe Op
- parseOpHeader :: ByteString -> Maybe Op
- opParser :: Parser Op
- opHeaderParser :: Parser Op
- updateOpValue :: Op -> ValueT -> Op
Documentation
Constructors
| SetOp !ByteString !Word32 !Word64 !BytesT ValueT ![Option] | |
| CasOp !ByteString !Word32 !Word64 !BytesT !Word64 ValueT ![Option] | |
| AddOp !ByteString !Word32 !Word64 !BytesT ValueT ![Option] | |
| ReplaceOp !ByteString !Word32 !Word64 !BytesT ValueT ![Option] | |
| AppendOp !ByteString !Word32 !Word64 !BytesT ValueT ![Option] | |
| PrependOp !ByteString !Word32 !Word64 !BytesT ValueT ![Option] | |
| GetOp ![ByteString] | |
| GetsOp ![ByteString] | |
| DeleteOp !ByteString ![Option] | |
| IncrOp !ByteString !Word64 ![Option] | |
| DecrOp !ByteString !Word64 ![Option] | |
| TouchOp !ByteString !Word64 ![Option] | |
| PingOp | |
| FlushAllOp | |
| VersionOp | |
| QuitOp | |
| StatsOp ![ByteString] |
isNoreplyOp :: Op -> Bool Source
true if an operation has noreply option
isStorageOp :: Op -> Bool Source
true if an operation is a storage command
toOption :: ByteString -> Maybe Option Source
parse a option string
toOptions :: [ByteString] -> Maybe [Option] Source
parse option strings
keyOf :: Op -> Maybe ByteString Source
get the key of an operation
parseOp :: ByteString -> Maybe Op Source
Parse an operation.
parseOpHeader :: ByteString -> Maybe Op Source
Parse an operation but only its header.
opHeaderParser :: Parser Op Source
command header parser by attoparsec
updateOpValue :: Op -> ValueT -> Op Source
update the value of an operation