persistent-postgresql 2.1.0.1 → 2.1.1
raw patch · 3 files changed
+13/−8 lines, 3 files
Files
- ChangeLog.md +3/−0
- Database/Persist/Postgresql.hs +8/−7
- persistent-postgresql.cabal +2/−1
+ ChangeLog.md view
@@ -0,0 +1,3 @@+## 2.1.1++Added `FromJSON` instance for `PostgresConf`.
Database/Persist/Postgresql.hs view
@@ -849,12 +849,8 @@ -- ^ How many connections should be held on the connection pool. } -instance PersistConfig PostgresConf where- type PersistConfigBackend PostgresConf = SqlPersistT- type PersistConfigPool PostgresConf = ConnectionPool- createPoolConfig (PostgresConf cs size) = runNoLoggingT $ createPostgresqlPool cs size -- FIXME- runPool _ = runSqlPool- loadConfig (Object o) = do+instance FromJSON PostgresConf where+ parseJSON = withObject "PostgresConf" $ \o -> do database <- o .: "database" host <- o .: "host" port <- o .:? "port" .!= 5432@@ -870,7 +866,12 @@ } cstr = PG.postgreSQLConnectionString ci return $ PostgresConf cstr pool- loadConfig _ = mzero+instance PersistConfig PostgresConf where+ type PersistConfigBackend PostgresConf = SqlPersistT+ type PersistConfigPool PostgresConf = ConnectionPool+ createPoolConfig (PostgresConf cs size) = runNoLoggingT $ createPostgresqlPool cs size -- FIXME+ runPool _ = runSqlPool+ loadConfig = parseJSON applyEnv c0 = do env <- getEnvironment
persistent-postgresql.cabal view
@@ -1,5 +1,5 @@ name: persistent-postgresql-version: 2.1.0.1+version: 2.1.1 license: MIT license-file: LICENSE author: Felipe Lessa, Michael Snoyman <michael@snoyman.com>@@ -12,6 +12,7 @@ build-type: Simple homepage: http://www.yesodweb.com/book/persistent bug-reports: https://github.com/yesodweb/persistent/issues+extra-source-files: ChangeLog.md library build-depends: base >= 4 && < 5