Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
MSSQL Connection
This module handles the connection against an MS SQL Server. It defines the connection string, connection pool, default settings, and conversion functions between MSSQL and graphql-engine.
Synopsis
- class MonadError QErr m => MonadMSSQLTx m where
- liftMSSQLTx :: TxE QErr a -> m a
- data MSSQLPoolSettings
- defaultMSSQLMaxConnections :: Int
- data MSSQLConnectionInfo = MSSQLConnectionInfo {
- _mciConnectionString :: InputConnectionString
- _mciPoolSettings :: MSSQLPoolSettings
- _mciIsolationLevel :: TxIsolation
- data MSSQLConnConfiguration = MSSQLConnConfiguration MSSQLConnectionInfo (Maybe (NonEmpty MSSQLConnectionInfo))
- createMSSQLPool :: MonadIO m => QErrM m => InputConnectionString -> ConnectionOptions -> Environment -> m (ConnectionString, MSSQLPool)
- getEnv :: QErrM m => Environment -> Text -> m Text
- data MSSQLExecCtx = MSSQLExecCtx {
- mssqlRunReadOnly :: MSSQLRunTx
- mssqlRunReadWrite :: MSSQLRunTx
- mssqlRunSerializableTx :: MSSQLRunTx
- mssqlDestroyConn :: IO ()
- mssqlResizePools :: ServerReplicas -> IO SourceResizePoolSummary
- mkMSSQLExecCtx :: TxIsolation -> MSSQLPool -> ResizePoolStrategy -> MSSQLExecCtx
- resizeMSSQLPool :: MSSQLPool -> Int -> ServerReplicas -> IO ()
- mkMSSQLAnyQueryTx :: Query -> TxET QErr IO ()
- data MSSQLSourceConfig = MSSQLSourceConfig ConnectionString MSSQLExecCtx Int
- odbcValueToJValue :: Value -> Value
- runMSSQLSourceReadTx :: (MonadIO m, MonadBaseControl IO m) => MSSQLSourceConfig -> TxET QErr m a -> m (Either QErr a)
- runMSSQLSourceWriteTx :: (MonadIO m, MonadBaseControl IO m) => MSSQLSourceConfig -> TxET QErr m a -> m (Either QErr a)
Documentation
class MonadError QErr m => MonadMSSQLTx m where Source #
liftMSSQLTx :: TxE QErr a -> m a Source #
Instances
MonadIO m => MonadMSSQLTx (TxET QErr m) Source # | |
Defined in Hasura.Backends.MSSQL.Connection | |
MonadMSSQLTx m => MonadMSSQLTx (ReaderT s m) Source # | |
Defined in Hasura.Backends.MSSQL.Connection | |
MonadMSSQLTx m => MonadMSSQLTx (StateT s m) Source # | |
Defined in Hasura.Backends.MSSQL.Connection | |
(Monoid w, MonadMSSQLTx m) => MonadMSSQLTx (WriterT w m) Source # | |
Defined in Hasura.Backends.MSSQL.Connection |
Orphan instances
data MSSQLPoolSettings Source #
Instances
data MSSQLConnectionInfo Source #
MSSQLConnectionInfo | |
|
Instances
data MSSQLConnConfiguration Source #
Instances
createMSSQLPool :: MonadIO m => QErrM m => InputConnectionString -> ConnectionOptions -> Environment -> m (ConnectionString, MSSQLPool) Source #
data MSSQLExecCtx Source #
Execution Context required to execute MSSQL transactions
MSSQLExecCtx | |
|
mkMSSQLExecCtx :: TxIsolation -> MSSQLPool -> ResizePoolStrategy -> MSSQLExecCtx Source #
Creates a MSSQL execution context for a single primary pool
resizeMSSQLPool :: MSSQLPool -> Int -> ServerReplicas -> IO () Source #
Resize MSSQL pool by setting the number of connections equal to allowed maximum connections across all server instances divided by number of instances
data MSSQLSourceConfig Source #
Instances
odbcValueToJValue :: Value -> Value Source #
runMSSQLSourceReadTx :: (MonadIO m, MonadBaseControl IO m) => MSSQLSourceConfig -> TxET QErr m a -> m (Either QErr a) Source #
runMSSQLSourceWriteTx :: (MonadIO m, MonadBaseControl IO m) => MSSQLSourceConfig -> TxET QErr m a -> m (Either QErr a) Source #
Orphan instances
NFData ConnectionString Source # | |
rnf :: ConnectionString -> () # | |
Hashable ConnectionString Source # | |
hashWithSalt :: Int -> ConnectionString -> Int Source # hash :: ConnectionString -> Int Source # |