module Rel8.Statement.SQL
  ( showDelete
  , showInsert
  , showUpdate
  )
where

-- base
import Prelude

-- rel8
import Rel8.Statement.Delete ( Delete, ppDelete )
import Rel8.Statement.Insert ( Insert, ppInsert )
import Rel8.Statement.Update ( Update, ppUpdate )


-- | Convert a 'Delete' to a 'String' containing a @DELETE@ statement.
showDelete :: Delete a -> String
showDelete :: Delete a -> String
showDelete = Doc -> String
forall a. Show a => a -> String
show (Doc -> String) -> (Delete a -> Doc) -> Delete a -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Delete a -> Doc
forall a. Delete a -> Doc
ppDelete


-- | Convert an 'Insert' to a 'String' containing an @INSERT@ statement.
showInsert :: Insert a -> String
showInsert :: Insert a -> String
showInsert = Doc -> String
forall a. Show a => a -> String
show (Doc -> String) -> (Insert a -> Doc) -> Insert a -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Insert a -> Doc
forall a. Insert a -> Doc
ppInsert


-- | Convert an 'Update' to a 'String' containing an @UPDATE@ statement.
showUpdate :: Update a -> String
showUpdate :: Update a -> String
showUpdate = Doc -> String
forall a. Show a => a -> String
show (Doc -> String) -> (Update a -> Doc) -> Update a -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Update a -> Doc
forall a. Update a -> Doc
ppUpdate