riak-1.2.0.0: A Haskell client for the Riak decentralized data store
Copyright(c) 2011 MailRank Inc.
LicenseApache
MaintainerMark Hibberd <mark@hibberd.id.au>, Nathan Hunter <nhunter@janrain.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Network.Riak.JSON

Description

This module allows storage and retrieval of JSON-encoded data.

The functions in this module do not perform any conflict resolution.

Synopsis

Documentation

data JSON a Source #

Instances

Instances details
Functor JSON Source # 
Instance details

Defined in Network.Riak.JSON

Methods

fmap :: (a -> b) -> JSON a -> JSON b #

(<$) :: a -> JSON b -> JSON a #

Bounded a => Bounded (JSON a) Source # 
Instance details

Defined in Network.Riak.JSON

Methods

minBound :: JSON a #

maxBound :: JSON a #

Eq a => Eq (JSON a) Source # 
Instance details

Defined in Network.Riak.JSON

Methods

(==) :: JSON a -> JSON a -> Bool #

(/=) :: JSON a -> JSON a -> Bool #

Ord a => Ord (JSON a) Source # 
Instance details

Defined in Network.Riak.JSON

Methods

compare :: JSON a -> JSON a -> Ordering #

(<) :: JSON a -> JSON a -> Bool #

(<=) :: JSON a -> JSON a -> Bool #

(>) :: JSON a -> JSON a -> Bool #

(>=) :: JSON a -> JSON a -> Bool #

max :: JSON a -> JSON a -> JSON a #

min :: JSON a -> JSON a -> JSON a #

Read a => Read (JSON a) Source # 
Instance details

Defined in Network.Riak.JSON

Show a => Show (JSON a) Source # 
Instance details

Defined in Network.Riak.JSON

Methods

showsPrec :: Int -> JSON a -> ShowS #

show :: JSON a -> String #

showList :: [JSON a] -> ShowS #

Semigroup a => Semigroup (JSON a) Source # 
Instance details

Defined in Network.Riak.JSON

Methods

(<>) :: JSON a -> JSON a -> JSON a #

sconcat :: NonEmpty (JSON a) -> JSON a #

stimes :: Integral b => b -> JSON a -> JSON a #

Monoid a => Monoid (JSON a) Source # 
Instance details

Defined in Network.Riak.JSON

Methods

mempty :: JSON a #

mappend :: JSON a -> JSON a -> JSON a #

mconcat :: [JSON a] -> JSON a #

(FromJSON a, ToJSON a) => IsContent (JSON a) Source # 
Instance details

Defined in Network.Riak.JSON

json :: a -> JSON a Source #

Wrap up a value so that it will be encoded and decoded as JSON when converted to/from Content.

plain :: JSON a -> a Source #

Unwrap a JSON-wrapped value.

get :: (FromJSON c, ToJSON c) => Connection -> Maybe BucketType -> Bucket -> Key -> R -> IO (Maybe ([c], VClock)) Source #

Retrieve a value. This may return multiple conflicting siblings. Choosing among them is your responsibility.

getMany :: (FromJSON c, ToJSON c) => Connection -> Maybe BucketType -> Bucket -> [Key] -> R -> IO [Maybe ([c], VClock)] Source #

put :: (FromJSON c, ToJSON c) => Connection -> Maybe BucketType -> Bucket -> Key -> Maybe VClock -> c -> W -> DW -> IO ([c], VClock) Source #

Store a single value. This may return multiple conflicting siblings. Choosing among them, and storing a new value, is your responsibility.

You should only supply Nothing as a VClock if you are sure that the given type+bucket+key combination does not already exist. If you omit a VClock but the type+bucket+key does exist, your value will not be stored.

putIndexed :: (FromJSON c, ToJSON c) => Connection -> Maybe BucketType -> Bucket -> Key -> [IndexValue] -> Maybe VClock -> c -> W -> DW -> IO ([c], VClock) Source #

Store a single value indexed.

put_ :: (FromJSON c, ToJSON c) => Connection -> Maybe BucketType -> Bucket -> Key -> Maybe VClock -> c -> W -> DW -> IO () Source #

Store a single value, without the possibility of conflict resolution.

You should only supply Nothing as a VClock if you are sure that the given type+bucket+key combination does not already exist. If you omit a VClock but the type+bucket+key does exist, your value will not be stored, and you will not be notified.

putMany :: (FromJSON c, ToJSON c) => Connection -> Maybe BucketType -> Bucket -> [(Key, Maybe VClock, c)] -> W -> DW -> IO [([c], VClock)] Source #

Store many values. This may return multiple conflicting siblings for each value stored. Choosing among them, and storing a new value in each case, is your responsibility.

You should only supply Nothing as a VClock if you are sure that the given type+bucket+key combination does not already exist. If you omit a VClock but the type+bucket+key does exist, your value will not be stored.

putMany_ :: (FromJSON c, ToJSON c) => Connection -> Maybe BucketType -> Bucket -> [(Key, Maybe VClock, c)] -> W -> DW -> IO () Source #

Store many values, without the possibility of conflict resolution.

You should only supply Nothing as a VClock if you are sure that the given type+bucket+key combination does not already exist. If you omit a VClock but the type+bucket+key does exist, your value will not be stored, and you will not be notified.