-
Notifications
You must be signed in to change notification settings - Fork 301
adding upsertWhere and upsertManyWhere to persistent-postgresql
#1222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
upsertWhere and upsertManyWhereupsertWhere and upsertManyWhere to persistent-postgresql
Co-authored-by: Matt Parsons <parsonsmatt@gmail.com>
| -- | ||
| -- -- @since 2.12.1.0 | ||
| upsertManyWhere :: | ||
| forall record backend m. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the project does use 4 space indentation - could you get that done?
(on master I've created .editorconfig and .stylish-haskell.yaml files which will help make that easier)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh my bad, I tried running stylish-haskell before pushing; I'll try again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stylish-haskell won't do formatting changes like that :\ It's fine to leave as-is, it can ge trefactored later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OH good to know
| {-# LANGUAGE OverloadedStrings #-} | ||
|
|
||
| module Database.Persist.Postgresql.Util ( | ||
| mkPostgresUpdateText |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this module only has one function, let's just put it directly in Database.Persist.Postgresql
Co-authored-by: Matt Parsons <parsonsmatt@gmail.com>
Co-authored-by: Matt Parsons <parsonsmatt@gmail.com>
| -- | ||
| -- -- @since 2.12.1.0 | ||
| upsertManyWhere :: | ||
| forall record backend m. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stylish-haskell won't do formatting changes like that :\ It's fine to leave as-is, it can ge trefactored later.
Co-authored-by: Matt Parsons <parsonsmatt@gmail.com>
…k of what we have
| -- `upsertManyWhere` | ||
| -- | ||
| -- @since 2.12.1.0 | ||
| -- TODO: we could probably make a sum type for the `Filter` record that's passed into the `upserWhere` and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@parsonsmatt does this TODO say enough/make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah!
|
@parsonsmatt did I address all the changes needed? |
| -- `upsertManyWhere` | ||
| -- | ||
| -- @since 2.12.1.0 | ||
| -- TODO: we could probably make a sum type for the `Filter` record that's passed into the `upserWhere` and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah!
Before submitting your PR, check that you've:
@sincedeclarations to the HaddockAfter submitting your PR:
(unreleased)on the Changelog