module TSN.DbImport (
DbImport(..),
ImportResult(..),
- dbimport_generic,
run_dbmigrate )
where
-- System imports
import Control.Monad.IO.Class ( MonadIO )
-import Database.Groundhog (
- runMigration )
+import Database.Groundhog ( runMigration )
import Database.Groundhog.Core ( Migration, PersistBackend )
import Network.Services.TSN.Report ( report_info )
dbmigrate :: (MonadIO m, PersistBackend m) => a -> m ()
--- | The simplest possible implementation of 'dbimport', for types
--- which happen to be members of the 'XmlImport' typeclass.
---
-dbimport_generic :: (XmlImport a, MonadIO m, PersistBackend m)
- => a
- -> m ImportResult
-dbimport_generic x = insert_xml x >> return ImportSucceeded
-
-
-- | A migration runner that will use our normal info reporting
-- mechanism.
--