-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | persistent support for apiary web framework. -- @package apiary-persistent @version 1.4.0 module Web.Apiary.Database.Persist data Persist data Migrator Logging :: Migration -> Migrator Silent :: Migration -> Migrator Unsafe :: Migration -> Migrator NoMigrate :: Migrator type With c m = forall a. (c -> m a) -> m a -- | construct persist extension initializer with no connection pool. -- -- example: -- --
-- initPersist (withSqliteConn "db.sqlite") migrateAll --initPersist :: (MonadIO m, MonadBaseControl IO m) => With SqlBackend (LogWrapper exts m) -> Migration -> Initializer m exts (Persist : exts) initPersistNoLog :: (MonadIO m, MonadBaseControl IO m) => With SqlBackend (NoLoggingT m) -> Migration -> Initializer m es (Persist : es) initPersistPool :: (MonadIO m, MonadBaseControl IO m) => With ConnectionPool (LogWrapper exts m) -> Migration -> Initializer m exts (Persist : exts) initPersistPoolNoLog :: (MonadIO m, MonadBaseControl IO m) => With ConnectionPool (NoLoggingT m) -> Migration -> Initializer m es (Persist : es) initPersist' :: (MonadIO n, MonadBaseControl IO n, Monad m) => (forall a. Extensions exts -> n a -> m a) -> With SqlBackend n -> Migrator -> Initializer m exts (Persist : exts) initPersistPool' :: (MonadIO n, MonadBaseControl IO n, Monad m) => (forall a. Extensions exts -> n a -> m a) -> With ConnectionPool n -> Migrator -> Initializer m exts (Persist : exts) -- | execute sql in action. class RunSQL m runSql :: RunSQL m => SqlPersistT m a -> m a -- | filter by sql query. since 0.9.0.0. sql :: (KnownSymbol k, Has Persist exts, MonadBaseControl IO actM, k prms) => Maybe Html -> proxy k -> SqlPersistT (ActionT exts [] actM) a -> (a -> Maybe b) -> Filter exts actM m prms ((k := b) : prms) instance [overlap ok] MonadBaseControl IO m => RunSQL (ReaderT Persist m) instance [overlap ok] (Has Persist es, MonadExts es m, MonadBaseControl IO m) => RunSQL m instance [overlap ok] Extension Persist