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

Safe HaskellNone
LanguageHaskell2010

Database.Postgres.Temp.Internal

Synopsis

Documentation

data DB Source #

Constructors

DB 

Fields

data SocketClass Source #

Constructors

Localhost 
Unix 

Instances

Bounded SocketClass Source # 
Enum SocketClass Source # 
Eq SocketClass Source # 
Ord SocketClass Source # 
Read SocketClass Source # 
Show SocketClass Source # 
Generic SocketClass Source # 

Associated Types

type Rep SocketClass :: * -> * #

type Rep SocketClass Source # 
type Rep SocketClass = D1 (MetaData "SocketClass" "Database.Postgres.Temp.Internal" "tmp-postgres-0.1.1.1-5ubnLktHgBAm4UMDIUVVm" False) ((:+:) (C1 (MetaCons "Localhost" PrefixI False) U1) (C1 (MetaCons "Unix" PrefixI False) U1))

start Source #

Arguments

:: [(String, String)]

Extra options which override the defaults

-> IO (Either StartError DB) 

start postgres and use the current processes stdout and stderr

startLocalhost Source #

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 Source #

startWithHandles Source #

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

startAndLogToTmp Source #

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 Source #

Stop postgres and clean up the temporary database folder.