mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-14 22:32:07 +03:00
Update example code.
This commit is contained in:
parent
a76b21624c
commit
e8fc026cad
@ -279,6 +279,7 @@ run = handleSqlError' $ withConnectionIO connect
|
|||||||
runU :: Show a => (ExecutedStatement (User, Group) -> IO a) -> IO ()
|
runU :: Show a => (ExecutedStatement (User, Group) -> IO a) -> IO ()
|
||||||
runU f = handleSqlError' $ withConnectionIO connect
|
runU f = handleSqlError' $ withConnectionIO connect
|
||||||
(\conn -> do
|
(\conn -> do
|
||||||
|
putStrLn $ "SQL: " ++ sqlFromRelation userGroupU
|
||||||
pq <- prepare conn (relationalQuery userGroupU)
|
pq <- prepare conn (relationalQuery userGroupU)
|
||||||
let bs = ("Kei Hibino", "Haskell") `bindTo` pq
|
let bs = ("Kei Hibino", "Haskell") `bindTo` pq
|
||||||
es <- execute bs
|
es <- execute bs
|
||||||
|
Loading…
Reference in New Issue
Block a user