Skip to content
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

Suggest using optionsToDefaultConfig to generate Config from Options #268

Merged
merged 1 commit into from
Sep 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/Database/Postgres/Temp/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,14 @@ withRestart db f = bracket (restart db) (either mempty stop) $
either (pure . Left) (fmap Right . f)

-- | Attempt to create a 'Config' from a 'Client.Options'. Useful if you
-- want to create a database owned by a specific user you will also login
-- with among other use cases.
-- want to create a database
--
-- * owned by a specific user you will also login with
-- * with a specific name (i.e. not the default name, "postgres")
--
-- among other use cases. Changing the 'connectionOptions' field of
-- 'Config' does /not/ achieve these results and you are likely to see
-- unexpected behaviour if you try to.
--
-- @since 1.21.0.0
optionsToDefaultConfig :: Client.Options -> Config
Expand Down