Skip to content

Commit 4c85ff5

Browse files
Merge pull request #25 from brandonchinn178/update-quickstart
Update quickstart
2 parents 06a8d36 + 303118f commit 4c85ff5

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.1.0.1
2+
3+
Fix quickstart
4+
15
# 0.1.0.0
26

37
Initial release

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import Control.Monad.IO.Class (MonadIO(..))
3232
import Control.Monad.Logger (runStderrLoggingT)
3333
import Database.Persist.Sql (Entity(..), toSqlKey, (<.))
3434
import Database.Persist.Monad
35-
import Database.Persist.Sqlite (withSqliteConn)
35+
import Database.Persist.Sqlite (withSqlitePool)
3636
import Database.Persist.TH
3737
import UnliftIO (MonadUnliftIO(..), wrappedWithRunInIO)
3838

@@ -58,8 +58,8 @@ getYoungPeople :: (MonadIO m, MonadSqlQuery m) => m [Entity Person]
5858
getYoungPeople = selectList [PersonAge <. 18] []
5959

6060
main :: IO ()
61-
main = runStderrLoggingT $ withSqliteConn ":memory:" $ \conn ->
62-
liftIO $ runSqlQueryT (BackendSingle conn) $ unMyApp $ do
61+
main = runStderrLoggingT $ withSqlitePool "db.sqlite" 5 $ \conn ->
62+
liftIO $ runSqlQueryT conn $ unMyApp $ do
6363
runMigration migrate
6464
insert_ $ Person "Alice" 25
6565
insert_ $ Person "Bob" 10

package.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: persistent-mtl
2-
version: 0.1.0.0
2+
version: 0.1.0.1
33
maintainer: Brandon Chinn <[email protected]>
44
synopsis: Monad transformer for the persistent API
55
description: |

persistent-mtl.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ cabal-version: 1.12
44
--
55
-- see: https://github.com/sol/hpack
66
--
7-
-- hash: b4cebf2dfec7ddb84809e77bf7c91ea81fd89f22a13763b7ee032b13313dfebd
7+
-- hash: 9b6ae20631ee5ad633b82ab405f64730ea1603ef8da2099ea41ef126cab9d817
88

99
name: persistent-mtl
10-
version: 0.1.0.0
10+
version: 0.1.0.1
1111
synopsis: Monad transformer for the persistent API
1212
description: A monad transformer and mtl-style type class for using the
1313
persistent API directly in your monad transformer stack.

0 commit comments

Comments
 (0)