Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
MSSQL Connection Pooling
Synopsis
- newtype ConnectionString = ConnectionString {}
- data ConnectionOptions
- = ConnectionOptions {
- _coConnections :: Int
- _coStripes :: Int
- _coIdleTime :: Int
- | ConnectionOptionsNoPool
- = ConnectionOptions {
- data MSSQLPool
- = MSSQLPool (Pool Connection)
- | MSSQLNoPool (IO Connection)
- initMSSQLPool :: ConnectionString -> ConnectionOptions -> IO MSSQLPool
- drainMSSQLPool :: MSSQLPool -> IO ()
- withMSSQLPool :: MonadBaseControl IO m => MSSQLPool -> (Connection -> m a) -> m (Either ODBCException a)
- resizePool :: MSSQLPool -> Int -> IO ()
- getInUseConnections :: MSSQLPool -> IO Int
Documentation
newtype ConnectionString Source #
ODBC connection string for MSSQL server
Instances
data ConnectionOptions Source #
ConnectionOptions | |
| |
ConnectionOptionsNoPool |
Instances
Show ConnectionOptions Source # | |
Defined in Database.MSSQL.Pool showsPrec :: Int -> ConnectionOptions -> ShowS # show :: ConnectionOptions -> String # showList :: [ConnectionOptions] -> ShowS # | |
Eq ConnectionOptions Source # | |
Defined in Database.MSSQL.Pool (==) :: ConnectionOptions -> ConnectionOptions -> Bool # (/=) :: ConnectionOptions -> ConnectionOptions -> Bool # |
initMSSQLPool :: ConnectionString -> ConnectionOptions -> IO MSSQLPool Source #
Initialize an MSSQL pool with given connection configuration
drainMSSQLPool :: MSSQLPool -> IO () Source #
Destroy all pool resources
withMSSQLPool :: MonadBaseControl IO m => MSSQLPool -> (Connection -> m a) -> m (Either ODBCException a) Source #