Update example code.

This commit is contained in:
Kei Hibino 2013-09-03 23:51:55 +09:00
parent a76b21624c
commit e8fc026cad

View File

@ -279,6 +279,7 @@ run = handleSqlError' $ withConnectionIO connect
runU :: Show a => (ExecutedStatement (User, Group) -> IO a) -> IO ()
runU f = handleSqlError' $ withConnectionIO connect
(\conn -> do
putStrLn $ "SQL: " ++ sqlFromRelation userGroupU
pq <- prepare conn (relationalQuery userGroupU)
let bs = ("Kei Hibino", "Haskell") `bindTo` pq
es <- execute bs