Skip to content

Commit

Permalink
Suggest using optionsToDefaultConfig to generate Config from Options
Browse files Browse the repository at this point in the history
rather than changing the connectionOptions field of Config.  Partially
addresses

    #267
  • Loading branch information
tomjaguarpaw committed Sep 5, 2020
1 parent 9538291 commit b0c2f51
Showing 1 changed file with 8 additions and 2 deletions.
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

0 comments on commit b0c2f51

Please sign in to comment.