Skip to content

Commit

Permalink
Merge pull request #725 from paul-rouse/master
Browse files Browse the repository at this point in the history
Fix haddocks: postfix comments on GADT fields don't work - use prefix…
  • Loading branch information
paul-rouse authored Oct 25, 2017
2 parents 24cf0e4 + 81ba831 commit e2f9201
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions persistent-mysql/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.6.2.1

* Fix haddock documentation [#725](https://github.com/yesodweb/persistent/pull/725)

## 2.6.2

* Extend the `SomeField` type to allow `insertManyOnDuplicateKeyUpdate` to conditionally copy values.
Expand Down
7 changes: 4 additions & 3 deletions persistent-mysql/Database/Persist/MySQL.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1048,12 +1048,13 @@ insertOnDuplicateKeyUpdate record =
-- | This type is used to determine how to update rows using MySQL's
-- @INSERT ON DUPLICATE KEY UPDATE@ functionality, exposed via
-- 'insertManyOnDuplicateKeyUpdate' in the library.
--
-- @since 2.6.2
data SomeField record where
-- | Copy the field directly from the record.
SomeField :: EntityField record typ -> SomeField record
-- ^ Copy the field directly from the record.
-- | Only copy the field if it is not equal to the provided value.
CopyUnlessEq :: PersistField typ => EntityField record typ -> typ -> SomeField record
-- ^ Only copy the field if it is not equal to the provided value.
-- @since 2.6.2

-- | Copy the field into the database only if the value in the
-- corresponding record is non-@NULL@.
Expand Down
2 changes: 1 addition & 1 deletion persistent-mysql/persistent-mysql.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: persistent-mysql
version: 2.6.2
version: 2.6.2.1
license: MIT
license-file: LICENSE
author: Felipe Lessa <felipe.lessa@gmail.com>, Michael Snoyman
Expand Down

0 comments on commit e2f9201

Please sign in to comment.