Safe Haskell | None |
---|---|
Language | Haskell2010 |
Graphula.Key
Description
Convenience functions for working with Key
dependencies
Documentation
class EntityKeys a where Source #
Associated Types
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
.
Instances
EntityKeys (Only (Entity a)) Source # | |
(TypeError ((('Text "Cannot use naked \8216" ':<>: 'ShowType (Entity a)) ':<>: 'Text "\8217 as argument to \8216keys\8217.") ':$$: (('Text "Did you mean \8216Only (" ':<>: 'ShowType (Entity a)) ':<>: 'Text ")\8217?")) :: Constraint) => EntityKeys (Entity a) Source # | |
EntityKeys (Entity a, Entity b) Source # | |
EntityKeys (Entity a, Entity b, Entity c) Source # | |
EntityKeys (Entity a, Entity b, Entity c, Entity d) Source # | |