                (mrow :: Maybe (Double,I.Int64))
                    <- H.single $ [H.q|SELECT *
                                       FROM data
                                       WHERE field1=?|] num
                case mrow of
                    Just (field1,field2) ->
                                let newfield2 = field2 * 2 + 1
                                in H.unit $ [H.q|UPDATE data
                                                 SET field2=?
                                                 WHERE field1=?|] newfield2 field1