Safe Haskell | None |
---|---|
Language | Haskell98 |
- termToMapReduce :: (ReQL -> ReQL) -> State QuerySettings (ReQL -> ReQL)
- sameVar :: Int -> [Term] -> Bool
- notConst :: Chain -> Bool
- wrap :: Term -> ReQL
- toFun1 :: Term -> ReQL -> ReQL
- toFun2 :: Term -> ReQL -> ReQL -> ReQL
- data MRF = MRF {
- _mrfMapFun :: MapFun
- _mrfReduceFun :: ReQL -> ReQL -> ReQL
- _mrfBase :: Maybe ReQL
- _mrfFinally :: ReQL -> ReQL
- data Chain
- data Map = BuiltInMap TermType [ReQL] [OptArg] MapFun
- data MapFun
- data Reduce = BuiltInReduce TermType [ReQL] [OptArg] MRF
- applyChain :: Chain -> ReQL -> ReQL
- applyMRF :: MRF -> ReQL -> ReQL
- applyMaps :: [Map] -> ReQL -> ReQL
- applyMap :: Map -> ReQL -> ReQL
- applyMapFun :: MapFun -> ReQL -> ReQL
- applyReduce :: Reduce -> ReQL -> ReQL
- chainToMRF :: Chain -> Either ReQL MRF
- thenFinally :: MRF -> (ReQL -> ReQL) -> MRF
- thenMRF :: [Map] -> MRF -> MRF
- composeMaps :: [Map] -> MapFun
- composeMapFun :: MapFun -> MapFun -> MapFun
- thenReduce :: [Map] -> Reduce -> MRF
- collect :: MRF
- toMapReduce :: Int -> Term -> Chain
- singleton :: TermType -> [Chain] -> [TermAttribute] -> Maybe ReQL
- mrChain :: TermType -> Chain -> [Term] -> [TermAttribute] -> Maybe Chain
- mapMRF :: TermType -> [Term] -> [TermAttribute] -> Maybe MapFun
- reduceMRF :: TermType -> [Term] -> [TermAttribute] -> Maybe MRF
- baseAttrToOptArg :: TermAttribute -> OptArg
- noRecurse :: OptArg
- rewrite1 :: TermType -> [Chain] -> [(Text, Chain)] -> MRF
- rewritex :: TermType -> [Chain] -> [(Key, Chain)] -> MRF
- extract :: Maybe Int -> TermType -> [Chain] -> [(Key, Chain)] -> ([ReQL] -> ReQL, [MRF])
Documentation
termToMapReduce :: (ReQL -> ReQL) -> State QuerySettings (ReQL -> ReQL) Source
Takes a function that takes a sequence as an argument, and returns a function that only uses that sequence once, by merging the map and reduce operations. This is used by groupBy.
toFun1 :: Term -> ReQL -> ReQL Source
Build a single argument function from a constant ReQL expression
toFun2 :: Term -> ReQL -> ReQL -> ReQL Source
Build a two argument function from a constant ReQL expression
Represents a map/reduce operation split into its map and reduce parts
MRF | |
|
A Chain of ReQL expressions that might be transformed into a map/reduce operation
applyChain :: Chain -> ReQL -> ReQL Source
Convert a Chain back into a ReQL function
applyMapFun :: MapFun -> ReQL -> ReQL Source
applyReduce :: Reduce -> ReQL -> ReQL Source
composeMaps :: [Map] -> MapFun Source
composeMapFun :: MapFun -> MapFun -> MapFun Source
thenReduce :: [Map] -> Reduce -> MRF Source
toMapReduce :: Int -> Term -> Chain Source
Rewrites the term in the second argument to merge all uses of the variable whose id is given in the first argument.
mrChain :: TermType -> Chain -> [Term] -> [TermAttribute] -> Maybe Chain Source
Chain a ReQL command onto a MapReduce operation
mapMRF :: TermType -> [Term] -> [TermAttribute] -> Maybe MapFun Source
Convert some builtin operations into a map
reduceMRF :: TermType -> [Term] -> [TermAttribute] -> Maybe MRF Source
Convert some of the built-in operations into a map/reduce
TODO: these have not been tested
baseAttrToOptArg :: TermAttribute -> OptArg Source
Convert from one representation to the other
This undocumented optional argument circumvents stream polymorphism on some operations
rewrite1 :: TermType -> [Chain] -> [(Text, Chain)] -> MRF Source
Rewrite a command into a map/reduce.
This is a special case for when only one of the arguments is itself a map/reduce