Safe Haskell | None |
---|---|
Language | Haskell2010 |
Combinators that can be used for aggregating independent queries. See my article about aggregating mget queries for more information.
Synopsis
- newtype T x y a b = T (Traversal a b x y)
- type (⟿) a b = T ByteString (Maybe ByteString) a b
- type (~~>) a b = T ByteString (Maybe ByteString) a b
- type Query a b = a ⟿ b
- aggregatePair :: (Traversing p, Functor (p (a, a')), Applicative (p (a, a'))) => p a b -> p a' b' -> p (a, a') (b, b')
- remember :: T x y a b -> T x y a (a, b)
- runT :: Functor f => ([x] -> f [y]) -> T x y a b -> a -> f b
- data MSET
Documentation
Abstract representation for aggregation.
type (⟿) a b = T ByteString (Maybe ByteString) a b Source #
A query using input of type a
and yielding an output of type b
type (~~>) a b = T ByteString (Maybe ByteString) a b Source #
An ASCII version of ⟿
aggregatePair :: (Traversing p, Functor (p (a, a')), Applicative (p (a, a'))) => p a b -> p a' b' -> p (a, a') (b, b') Source #
We can merge any two arbitrary mget queries.
runT :: Functor f => ([x] -> f [y]) -> T x y a b -> a -> f b Source #
Reify aggregation into a target functor.
Aggregate, atomic multi-set query (as in setting multiple things in a single query)
Aggregated mset
query