Skip to content

Conversation

@dmarticus
Copy link
Contributor

@dmarticus dmarticus commented Mar 31, 2021

Before submitting your PR, check that you've:

After submitting your PR:

  • Update the Changelog.md file with a link to your PR
  • Bumped the version number if there isn't an (unreleased) on the Changelog
  • Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts)

@dmarticus dmarticus changed the title Mer 676 adding upsertWhere and upsertManyWhere Mar 31, 2021
@dmarticus dmarticus marked this pull request as draft March 31, 2021 21:29
@dmarticus dmarticus marked this pull request as ready for review March 31, 2021 22:02
@dmarticus dmarticus changed the title adding upsertWhere and upsertManyWhere adding upsertWhere and upsertManyWhere to persistent-postgresql Apr 1, 2021
Co-authored-by: Matt Parsons <parsonsmatt@gmail.com>
--
-- -- @since 2.12.1.0
upsertManyWhere ::
forall record backend m.
Copy link
Collaborator

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)

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

Copy link
Contributor Author

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
Copy link
Collaborator

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

dmarticus and others added 2 commits April 6, 2021 16:31
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.
Copy link
Collaborator

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.

-- `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
Copy link
Contributor Author

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?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah!

@dmarticus
Copy link
Contributor Author

@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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah!

@parsonsmatt parsonsmatt merged commit 9f25cb8 into yesodweb:master Apr 8, 2021
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