Skip to content

Add insertUniqueEntity method#718

Merged
psibi merged 4 commits intoyesodweb:masterfrom
cdepillabout:add-insert-unique-entity-method
Oct 21, 2017
Merged

Add insertUniqueEntity method#718
psibi merged 4 commits intoyesodweb:masterfrom
cdepillabout:add-insert-unique-entity-method

Conversation

@cdepillabout
Copy link
Contributor

This PR adds a insertUniqueEntity helper method.

This is a combination of insertEntity and insertUnique:

insertEntity :: record -> ReaderT backend m (Entity record)

insertUnique :: record -> ReaderT backend m (Maybe (Key record))

insertUniqueEntity :: record -> ReaderT backend m (Maybe (Entity record))

This commit adds an insertUniqueEntity method, which is a combination of
insertUnique and insertEntity.
@cdepillabout cdepillabout force-pushed the add-insert-unique-entity-method branch from 5ddaba7 to a56fa4a Compare October 21, 2017 08:35
@psibi
Copy link
Member

psibi commented Oct 21, 2017

Can you add @since haddock markup for the introduced function add add corresponding changelog ?

@cdepillabout
Copy link
Contributor Author

@psibi Thanks for the review. The @since annotation and changelog entry have been added in commit de5c7e1.

@psibi psibi merged commit bddb397 into yesodweb:master Oct 21, 2017
@psibi
Copy link
Member

psibi commented Oct 21, 2017

Thanks for the PR!

@cdepillabout cdepillabout deleted the add-insert-unique-entity-method branch October 24, 2017 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants