Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"purescript": "0.15.2",
"purescript-language-server": "^0.16.6",
"purescript-psa": "^0.8.2",
"purty": "7.0.0",
"purs-tidy": "0.9.2",
"rimraf": "^2.6.2",
"spago": "^0.20.8",
"pscid": "2.9.3"
Expand Down
32 changes: 16 additions & 16 deletions src/GetSchema.purs
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,21 @@ app config =
fromParts [ host, port, db, user ] =
portFromString port
<#> \p ->
(poolConfig db)
{ host = Just host
, port = Just p
, user = Just user
}
(poolConfig db)
{ host = Just host
, port = Just p
, user = Just user
}

fromParts [ host, port, db, user, password ] =
portFromString port
<#> \p ->
(poolConfig db)
{ host = Just host
, port = Just p
, user = Just user
, password = Just password
}
(poolConfig db)
{ host = Just host
, port = Just p
, user = Just user
, password = Just password
}

fromParts _ = Left "Config parameter must be of the form <host>:<port>:<db>:<user>:<password> (password optional)"

Expand All @@ -79,11 +79,11 @@ dbModules config@{ getSchemaConfig: { dbManagedColumns, scalaPkg, pursPkg } } =
else
for config.table $ Database.tableModule pool { dbManagedColumns, scalaPkg, pursPkg }

type Config
= { table :: Maybe String
, poolConfig :: Pool.Configuration
, getSchemaConfig :: GetSchemaConfig
}
type Config =
{ table :: Maybe String
, poolConfig :: Pool.Configuration
, getSchemaConfig :: GetSchemaConfig
}

prependNotice :: String -> String
prependNotice = ("// This file is automatically generated from DB schema. Do not edit.\n" <> _)
Expand Down
3 changes: 1 addition & 2 deletions test/Support.purs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module Test.Support where

import Data.Newtype

newtype Newint
= Newint Int
newtype Newint = Newint Int

derive instance newtypeNewint :: Newtype Newint _