Skip to content

Conversation

@ixmatus
Copy link
Contributor

@ixmatus ixmatus commented Aug 7, 2023

This change adds a connection pool creation function that is just like the createPostgresqlPoolModifiedWithVersion function but that can take a custom open'-like connection-creation function.

The motivation for this change is that we need to be able to customize the resource creation action dynamically at run-time.

Before submitting your PR, check that you've:

  • Documented new APIs with Haddock markup
  • Added @since declarations to the Haddock
  • Ran stylish-haskell on any changed files.
  • Adhered to the code style (see the .editorconfig file for details)

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)

ixmatus added 9 commits August 7, 2023 16:55
This change adds a connection pool creation function that is just like
the `createPostgresqlPoolModifiedWithVersion` function but that can
take a custom `open'`-like connection-creation function.

The motivation for this change is that we need to be able to customize
the resource creation action dynamically at run-time.
This change alters the API surface (via addition) and, as-per
`CONTRIBUTING.md`, requires a `C` bump.
... so that users can construct their own `open'`-like function.
... so users don't have to write their own.
@ixmatus ixmatus force-pushed the parnell/custom-mkconn branch from 75355e4 to 9788fad Compare August 8, 2023 00:05
Copy link
Collaborator

@parsonsmatt parsonsmatt left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me, though I do think the panoply of creation functions is getting a bit out of hand. I'll make a followup issue to refactor this and make an interface exposing a datatype-of-functions for these hooks.

@parsonsmatt
Copy link
Collaborator

Can you repush to trigger CI? Not sure why it isn't going

@ixmatus
Copy link
Contributor Author

ixmatus commented Sep 8, 2023

@parsonsmatt I just re-pushed but that looks like it didn't trigger CI.

@parsonsmatt parsonsmatt modified the milestone: 2.14.6 Sep 18, 2023
@parsonsmatt parsonsmatt merged commit 428c89f into yesodweb:master Sep 18, 2023
@parsonsmatt
Copy link
Collaborator

Sorry for the delay - released as persistent-postgresql-2.13.6

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