putlenses-0.1.0: Put-based lens library

Stabilityprovisional
MaintainerHugo Pacheco <hpacheco@nii.ac.jp>
Safe HaskellNone

Generics.Putlenses.Examples.People

Contents

Description

Database examples for a source database with a list of people.

Synopsis

Documentation

data Person Source

Constructors

Person 

Fields

name :: Name
 
city :: City
 

DB project

DB select

selectPut :: (Monad m, Eq a, Ord k) => (a -> k) -> (Maybe [a] -> m [a]) -> (a -> Bool) -> PutlensM m [a] [a]Source

Generic database select putlens

selectPut' :: (Monad m, Eq a, Ord k) => (a -> k) -> (a -> Bool) -> PutlensStateM m (Maybe a, [a]) [a] [a]Source

recoverEntry :: Ord k => (a -> k) -> [a] -> [a] -> (Maybe a, [a])Source

peopleFromPut :: Monad m => City -> PutlensM m [Person] [Person]Source

Selects all people from a city

peopleFromToPut :: Monad m => City -> City -> PutlensM m [Person] [Person]Source

Selects all people from a city (moves deleted people to a new city to)

DB Join