Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This cl
Since: 0.0.1.0
Synopsis
- data Update rec where
- updateSingleField :: Record rec => Update rec -> rec -> rec
- updateRecord :: Record rec => [Update rec] -> rec -> rec
Documentation
data Update rec where Source #
An operation representing an update against the rec
in question.
This type is partially an example - you may want to have a more sophisticated update type than merely setting fields.
Since: 0.0.1.0
Instances
(FieldDict FromJSON rec, FieldDict (Typeable :: Type -> Constraint) rec, FromJSON (SomeField rec)) => FromJSON (Update rec) Source # | Parses an { "field": field, "value": newValue } Since: 0.0.1.0 |
Defined in Prairie.Update | |
(FieldDict ToJSON rec, forall a. ToJSON (Field rec a)) => ToJSON (Update rec) Source # | Renders an { "field": Since: 0.0.1.0 |
(forall a. Show (Field rec a), FieldDict Show rec) => Show (Update rec) Source # | Since: 0.0.1.0 |
(forall a. Eq (Field rec a), FieldDict (Typeable :: Type -> Constraint) rec, FieldDict Eq rec) => Eq (Update rec) Source # | Since: 0.0.1.0 |
updateSingleField :: Record rec => Update rec -> rec -> rec Source #