{-# language RankNTypes #-}

module Database.Persist.SqlBackend.Internal.Statement where

import Data.Acquire
import Database.Persist.Types.Base
import Data.Int
import Conduit

-- | A 'Statement' is a representation of a database query that has been
-- prepared and stored on the server side.
data Statement = Statement
    { Statement -> IO ()
stmtFinalize :: IO ()
    , Statement -> IO ()
stmtReset :: IO ()
    , Statement -> [PersistValue] -> IO Int64
stmtExecute :: [PersistValue] -> IO Int64
    , Statement
-> forall (m :: * -> *).
   MonadIO m =>
   [PersistValue] -> Acquire (ConduitM () [PersistValue] m ())
stmtQuery :: forall m. MonadIO m
                => [PersistValue]
                -> Acquire (ConduitM () [PersistValue] m ())
    }