pg-harness-client 0.3.1 → 0.4.0
raw patch · 2 files changed
+6/−6 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
pg-harness-client.cabal view
@@ -1,5 +1,5 @@ Name: pg-harness-client-Version: 0.3.1+Version: 0.4.0 Synopsis: Client library for pg-harness-server Description: Client library for <https://hackage.haskell.org/package/pg-harness-server pg-harness-server>
src/Database/PostgreSQL/Harness/Client.hs view
@@ -63,11 +63,11 @@ where parse :: String -> ConnectionInformation parse s =- let (userPass, (_:hostPortDatabase)) = break ((==) '@') s in- let (user, (_:password)) = break ((==) ':') userPass in- let (hostPort, (_:databaseName)) = break ((==) '/') hostPortDatabase in- let (host, (_:port)) = break ((==) ':') hostPort in- ConnectionInformation host port databaseName user password+ case lines s of+ [ user, password, host, port, databaseName ] ->+ ConnectionInformation host port databaseName user password+ _ ->+ error $ "Invalid response from server: " ++ s -- | Convert connection information to a @libpq@ or -- @postgresql-simple@ compatible connection string.