module Database.SQLite.Simple.TypedQuery
( genJsonQuery
, genTypedQuery
, TQ.genUncurry
, TQ.TypedQuery(..)
, S.Query
)
where
import qualified Database.SQLite.Simple.Internal as S
import qualified Database.SQLite.Simple.Types as S
import qualified Database.SQLite.Simple as S
import Database.SQLite.Simple.DBmore()
import qualified Database.TypedQuery.Types as TQ
import Language.Haskell.TH.Syntax (Q, Exp, Lift(..))
import Prelude ( (.), id)
instance Lift S.Query where
lift = lift . S.fromQuery
instance TQ.RunDB S.Query where
rdquery _ = 'S.query
rdquery_ _ = 'S.query_
rdexecute_ _ = 'S.execute_
rdexecute _ = 'S.execute
rdin _ = 'id
rdonly _ = 'S.Only
rdconn _ = ''S.Connection
genJsonQuery :: TQ.TypedQuery S.Query -> Q Exp
genJsonQuery = TQ.genJsonQuery
genTypedQuery :: TQ.TypedQuery S.Query -> Q Exp
genTypedQuery = TQ.genTypedQuery