tmp-postgres-0.1.1.1: Start and stop a temporary postgres for testing

Safe HaskellNone
LanguageHaskell2010

Database.Postgres.Temp.Internal

Synopsis

Documentation

waitForDB :: String -> IO () #

data DB #

Constructors

DB 

Fields

data SocketClass #

Constructors

Localhost 
Unix 
Instances
Bounded SocketClass # 
Instance details

Defined in Database.Postgres.Temp.Internal

Enum SocketClass # 
Instance details

Defined in Database.Postgres.Temp.Internal

Eq SocketClass # 
Instance details

Defined in Database.Postgres.Temp.Internal

Ord SocketClass # 
Instance details

Defined in Database.Postgres.Temp.Internal

Read SocketClass # 
Instance details

Defined in Database.Postgres.Temp.Internal

Show SocketClass # 
Instance details

Defined in Database.Postgres.Temp.Internal

Generic SocketClass # 
Instance details

Defined in Database.Postgres.Temp.Internal

Associated Types

type Rep SocketClass :: Type -> Type #

type Rep SocketClass # 
Instance details

Defined in Database.Postgres.Temp.Internal

type Rep SocketClass = D1 (MetaData "SocketClass" "Database.Postgres.Temp.Internal" "tmp-postgres-0.1.1.1-2eipYmzkhY0D003opZyntt" False) (C1 (MetaCons "Localhost" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Unix" PrefixI False) (U1 :: Type -> Type))

start #

Arguments

:: [(String, String)]

Extra options which override the defaults

-> IO (Either StartError DB) 

start postgres and use the current processes stdout and stderr

startLocalhost #

Arguments

:: [(String, String)]

Extra options which override the defaults

-> IO (Either StartError DB) 

start postgres and use the current processes stdout and stderr but use TCP on localhost instead of a unix socket.

fourth :: (a, b, c, d) -> d #

startWithHandles #

Arguments

:: SocketClass 
-> [(String, String)]

Extra options which override the defaults

-> Handle
stdout
-> Handle
stderr
-> IO (Either StartError DB) 

Start postgres and pass in handles for stdout and stderr

data Event #

Instances
Bounded Event # 
Instance details

Defined in Database.Postgres.Temp.Internal

Enum Event # 
Instance details

Defined in Database.Postgres.Temp.Internal

Eq Event # 
Instance details

Defined in Database.Postgres.Temp.Internal

Methods

(==) :: Event -> Event -> Bool #

(/=) :: Event -> Event -> Bool #

Ord Event # 
Instance details

Defined in Database.Postgres.Temp.Internal

Methods

compare :: Event -> Event -> Ordering #

(<) :: Event -> Event -> Bool #

(<=) :: Event -> Event -> Bool #

(>) :: Event -> Event -> Bool #

(>=) :: Event -> Event -> Bool #

max :: Event -> Event -> Event #

min :: Event -> Event -> Event #

Show Event # 
Instance details

Defined in Database.Postgres.Temp.Internal

Methods

showsPrec :: Int -> Event -> ShowS #

show :: Event -> String #

showList :: [Event] -> ShowS #

startAndLogToTmp #

Arguments

:: [(String, String)]

Extra options which override the defaults

-> IO (Either StartError DB) 

Start postgres and log it's all stdout to {mainDir}/output.txt and {mainDir}/error.txt

stop :: DB -> IO ExitCode #

Stop postgres and clean up the temporary database folder.