| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphula.Key
Description
Convenience functions for working with Key dependencies
Documentation
Type-class for turning a tuple of Entity into a tuple of Key
For example, given:
instance HasDependencies Course where
type Dependencies Course = (SchoolId, TeacherId)
You would have to do,
course <- node @Course (entityKey school, entityKey teacher) mempty
This type-class allows you to do:
course <-node@Course (keys(school, teacher)) mempty
The type class instances currently scale up 4-tuple Dependencies.