relational-query: drop old internal API.

This commit is contained in:
Kei Hibino 2019-05-16 11:30:58 +09:00
parent ed871187e5
commit c8fbad4cb9

View File

@ -15,14 +15,10 @@ module Database.Relational.SimpleSql (
QuerySuffix, showsQuerySuffix,
-- * Update SQL
updatePrefixSQL,
updateOtherThanKeySQL,
-- * Insert SQL
insertPrefixSQL,
-- * Delete SQL
deletePrefixSQL
) where
import Data.Array (listArray, (!))
@ -47,10 +43,6 @@ type QuerySuffix = [Keyword]
showsQuerySuffix :: QuerySuffix -> StringSQL
showsQuerySuffix = mconcat
-- | Generate prefix string of update SQL.
updatePrefixSQL :: Table r -> StringSQL
updatePrefixSQL table = UPDATE <> stringSQL (name table)
-- | Generate update SQL by specified key and table.
-- Columns name list of table are also required.
updateSQL' :: String -- ^ Table name
@ -94,8 +86,3 @@ insertPrefixSQL :: Pi r r' -> Table r -> StringSQL
insertPrefixSQL pi' table =
INSERT <> INTO <> stringSQL (name table) <> rowConsStringSQL cols where
cols = Record.columns . Record.wpi (recordWidth table) (Record.unsafeFromTable table) $ pi'
-- | Generate all column delete SQL by specified table.
deletePrefixSQL :: Table r -- ^ Table metadata
-> StringSQL -- ^ Result SQL
deletePrefixSQL table = DELETE <> FROM <> stringSQL (name table)