Assign a field a value.
Examples
updateAge :: MonadIO m => ReaderT SqlBackend m ()
updateAge = updateWhere [UserName ==. "SPJ" ] [UserAge =. 45]
Similar to updateWhere which is shown in the above example you can use other functions present in the module Database.Persist.Class. Note that the first parameter of updateWhere is [Filter val] and second parameter is [Update val]. By comparing this with the type of ==. and =., you can see that they match up in the above usage.
The above query when applied on dataset-1, will produce this:
+-----+-----+--------+
|id |name |age |
+-----+-----+--------+
|1 |SPJ |40 -> 45|
+-----+-----+--------+
|2 |Simon|41 |
+-----+-----+--------+