mirror of
https://github.com/khibino/haskell-relational-record.git
synced 2024-12-15 14:53:28 +03:00
Add call example of inlineVerifiedQuery.
This commit is contained in:
parent
bdd11523ec
commit
9ef9f0b65a
@ -1,3 +1,4 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
|
||||
import QueryExample
|
||||
@ -16,8 +17,14 @@ import Database.HDBC.Record.Statement
|
||||
import Database.HDBC.Record.Query
|
||||
(runQuery, prepare, fetchUnique, fetchUnique')
|
||||
import Database.HDBC.Session (withConnectionIO, handleSqlError')
|
||||
import Database.HDBC.Query.TH (inlineVerifiedQuery)
|
||||
|
||||
|
||||
-- HDBC.PostgreSQL driver doesn't call DB check.
|
||||
$(inlineVerifiedQuery connect
|
||||
'userGroup2Fail userGroup2Fail
|
||||
defaultConfig [] "queryUserGroup2Fail")
|
||||
|
||||
runAndPrint :: (Show a, IConnection conn, FromSql SqlValue a, ToSql SqlValue p)
|
||||
=> conn -> Relation p a -> p -> IO ()
|
||||
runAndPrint conn rel param = do
|
||||
|
Loading…
Reference in New Issue
Block a user