Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- getFreePort :: IO Int
- waitForDB :: String -> IO ()
- data DB = DB {}
- data SocketClass
- start :: [(String, String)] -> IO (Either StartError DB)
- startLocalhost :: [(String, String)] -> IO (Either StartError DB)
- fourth :: (a, b, c, d) -> d
- procWith :: Handle -> Handle -> String -> [String] -> CreateProcess
- config :: Maybe FilePath -> String
- data StartError
- throwIfError :: (ExitCode -> StartError) -> ExitCode -> IO ()
- pidString :: ProcessHandle -> IO String
- runProcessWith :: Handle -> Handle -> String -> String -> [String] -> IO ExitCode
- startWithHandles :: SocketClass -> [(String, String)] -> Handle -> Handle -> IO (Either StartError DB)
- startWithHandlesAndDir :: SocketClass -> [(String, String)] -> FilePath -> Handle -> Handle -> IO (Either StartError DB)
- data Event
- rmDirIgnoreErrors :: FilePath -> IO ()
- startWithLogger :: (Event -> IO ()) -> SocketClass -> [(String, String)] -> FilePath -> Handle -> Handle -> IO (Either StartError DB)
- startAndLogToTmp :: [(String, String)] -> IO (Either StartError DB)
- terminateConnections :: DB -> IO ()
- stop :: DB -> IO ExitCode
Documentation
getFreePort :: IO Int Source #
DB | |
|
data SocketClass Source #
Instances
start postgres and use the current processes stdout and stderr
start postgres and use the current processes stdout and stderr but use TCP on localhost instead of a unix socket.
data StartError Source #
Instances
Eq StartError Source # | |
Defined in Database.Postgres.Temp.Internal (==) :: StartError -> StartError -> Bool # (/=) :: StartError -> StartError -> Bool # | |
Show StartError Source # | |
Defined in Database.Postgres.Temp.Internal showsPrec :: Int -> StartError -> ShowS # show :: StartError -> String # showList :: [StartError] -> ShowS # | |
Exception StartError Source # | |
Defined in Database.Postgres.Temp.Internal toException :: StartError -> SomeException # fromException :: SomeException -> Maybe StartError # displayException :: StartError -> String # |
throwIfError :: (ExitCode -> StartError) -> ExitCode -> IO () Source #
:: 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
startWithHandlesAndDir :: SocketClass -> [(String, String)] -> FilePath -> Handle -> Handle -> IO (Either StartError DB) Source #
rmDirIgnoreErrors :: FilePath -> IO () Source #
startWithLogger :: (Event -> IO ()) -> SocketClass -> [(String, String)] -> FilePath -> Handle -> Handle -> IO (Either StartError DB) Source #
terminateConnections :: DB -> IO () Source #
Force all connections to the database to close. Can be useful in some testing situations. Called during shutdown as well.