Safe Haskell | None |
---|---|
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
- newtype MSSQLConnectionString = MSSQLConnectionString {
- unMSSQLConnectionString :: Text
- data InputConnectionString
- = RawString ConnectionString
- | FromEnvironment Text
- data MSSQLPoolSettings = MSSQLPoolSettings {}
- defaultMSSQLPoolSettings :: MSSQLPoolSettings
- data MSSQLConnectionInfo = MSSQLConnectionInfo {}
- data MSSQLConnConfiguration = MSSQLConnConfiguration {}
- createMSSQLPool :: MonadIO m => QErrM m => MSSQLConnectionInfo -> Environment -> m (ConnectionString, MSSQLPool)
- resolveInputConnectionString :: QErrM m => Environment -> InputConnectionString -> m ConnectionString
- getEnv :: QErrM m => Environment -> Text -> m Text
- type MSSQLRunTx = forall m a. (MonadIO m, MonadBaseControl IO m) => TxET QErr m a -> ExceptT QErr m a
- data MSSQLExecCtx = MSSQLExecCtx {}
- mkMSSQLExecCtx :: MSSQLPool -> MSSQLExecCtx
- data MSSQLSourceConfig = MSSQLSourceConfig {}
- 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
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 | |
MonadIO m => MonadMSSQLTx (TxET QErr m) Source # | |
Defined in Hasura.Backends.MSSQL.Connection |
newtype MSSQLConnectionString Source #
ODBC connection string for MSSQL server
Orphan instances
data MSSQLConnectionInfo Source #
data MSSQLConnConfiguration Source #
Instances
createMSSQLPool :: MonadIO m => QErrM m => MSSQLConnectionInfo -> Environment -> m (ConnectionString, MSSQLPool) Source #
resolveInputConnectionString :: QErrM m => Environment -> InputConnectionString -> m ConnectionString Source #
getEnv :: QErrM m => Environment -> Text -> m Text Source #
type MSSQLRunTx = forall m a. (MonadIO m, MonadBaseControl IO m) => TxET QErr m a -> ExceptT QErr m a Source #
data MSSQLExecCtx Source #
Execution Context required to execute MSSQL transactions
MSSQLExecCtx | |
|
mkMSSQLExecCtx :: MSSQLPool -> MSSQLExecCtx Source #
Creates a MSSQL execution context for a single primary pool
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 hash :: ConnectionString -> Int | |
Cacheable ConnectionString Source # | |
unchanged :: Accesses -> ConnectionString -> ConnectionString -> Bool Source # |