-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Library for easily running embedded PostgreSQL server for tests -- -- Library for easily running embedded PostgreSQL server for tests @package postgres-embedded @version 0.1.6 -- | Library for easily running embedded PostgreSQL server for tests module Database.PostgreSQL.Embedded -- | Starts PostgreSQL instance with given config. -- -- Returns RuntimeConfig that is required for -- stopPostgres. startPostgres :: StartupConfig -> DBConfig -> IO RuntimeConfig -- | Stops PostgreSQL instance. -- -- Doesn't remove data directory. stopPostgres :: RuntimeConfig -> IO () -- | Version of PostgreSQL distribution See -- https://www.enterprisedb.com/downloads/postgres-postgresql-downloads -- for supported versions newtype Version Version :: String -> Version [value] :: Version -> String -- | Type of operation system Doesn't really work for Windows now data Os Win :: Os OSX :: Os Linux :: Os -- | Config for stating up instance Note that startup requeres clean or -- non-existing directory data StartupConfig StartupConfig :: Bool -> Version -> StartupConfig -- | Should data directory be cleaned up? [cleanDir] :: StartupConfig -> Bool -- | See Version [version] :: StartupConfig -> Version -- | Config of running instance data RuntimeConfig RuntimeConfig :: FilePath -> FilePath -> RuntimeConfig -- | Path of extracter PostgreSQL distribution [execDir] :: RuntimeConfig -> FilePath -- | Data directory [dataDir] :: RuntimeConfig -> FilePath -- | Database config data DBConfig DBConfig :: Integer -> String -> DBConfig -- | Port [port] :: DBConfig -> Integer -- | Username [username] :: DBConfig -> String