Copyright | 2014-2017 Kei Hibino |
---|---|

License | BSD3 |

Maintainer | ex8k.hibino@gmail.com |

Stability | experimental |

Portability | unknown |

Safe Haskell | None |

Language | Haskell2010 |

This module defines monad transformer which lift to basic `MonadQuery`

.

## Synopsis

- data Restrictings c m a
- restrictings :: Monad m => m a -> Restrictings c m a
- extractRestrict :: (Monad m, Functor m) => Restrictings c m a -> m (a, [Predicate c])

# Transformer into restricted context

data Restrictings c m a Source #

Type to accumulate query restrictions.
Type `c`

is context tag of restriction building like
Flat (where) or Aggregated (having).

## Instances

restrictings :: Monad m => m a -> Restrictings c m a Source #

Lift to `Restrictings`

# Result

extractRestrict :: (Monad m, Functor m) => Restrictings c m a -> m (a, [Predicate c]) Source #

Run `Restrictings`

to get `QueryRestriction`