Portability | portable |
---|---|
Stability | experimental |
Maintainer | Bryan O'Sullivan <bos@mailrank.com> |
This module allows storage and retrieval of JSON-encoded data.
The functions in this module do not perform any conflict resolution.
- data JSON a
- json :: (FromJSON a, ToJSON a) => a -> JSON a
- plain :: JSON a -> a
- get :: (FromJSON c, ToJSON c) => Connection -> Bucket -> Key -> R -> IO (Maybe ([c], VClock))
- getMany :: (FromJSON c, ToJSON c) => Connection -> Bucket -> [Key] -> R -> IO [Maybe ([c], VClock)]
- put :: (FromJSON c, ToJSON c) => Connection -> Bucket -> Key -> Maybe VClock -> c -> W -> DW -> IO ([c], VClock)
- put_ :: (FromJSON c, ToJSON c) => Connection -> Bucket -> Key -> Maybe VClock -> c -> W -> DW -> IO ()
- putMany :: (FromJSON c, ToJSON c) => Connection -> Bucket -> [(Key, Maybe VClock, c)] -> W -> DW -> IO [([c], VClock)]
- putMany_ :: (FromJSON c, ToJSON c) => Connection -> Bucket -> [(Key, Maybe VClock, c)] -> W -> DW -> IO ()
Documentation
json :: (FromJSON a, ToJSON a) => a -> JSON aSource
Wrap up a value so that it will be encoded and decoded as JSON
when converted to/from Content
.
getMany :: (FromJSON c, ToJSON c) => Connection -> Bucket -> [Key] -> R -> IO [Maybe ([c], VClock)]Source
put :: (FromJSON c, ToJSON c) => Connection -> Bucket -> Key -> Maybe VClock -> c -> W -> DW -> IO ([c], VClock)Source
put_ :: (FromJSON c, ToJSON c) => Connection -> Bucket -> Key -> Maybe VClock -> c -> W -> DW -> IO ()Source