Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ClientState
- sendableInState :: PacketType sender resp d -> ClientState -> Bool
- stateTransition :: PacketType sender resp d -> ClientState -> ClientState
- newtype ConnectionTimeout = ConnectionTimeout Int
- connectionTimeout :: ConnectionTimeout
- data TDSErrorType
- data TDSError where
- tdsErrorNoReq :: TDSErrorType -> ClientState -> String -> TDSError
- data ConnectionInfo = ConnectionInfo {}
- data TdsAuth = TdsAuth
- data Options = Options {
- _tdsOptionsSecure :: Bool
- _tdsAuth :: Maybe TdsAuth
- _tdsConnInfo :: ConnectionInfo
- _tdsOnMessage :: Message -> IO ()
- _tdsOnEnvChange :: EnvChange -> IO ()
- _tdsUser :: Text
- _tdsPassword :: Text
- _tdsDatabase :: Text
- _tdsAppName :: Text
- _tdsClientName :: Text
- defaultOptions :: Options
- tdsOptionSecure :: Options
- tdsOptionHost :: String -> Options
- tdsOptionPort :: Word16 -> Options
- tdsOptionUserAndPassword :: Text -> Text -> Options
- tdsOptionDatabase :: Text -> Options
- tdsDebugLogging :: Options
- data ResponseResult (ty :: ResponseType *) where
- ResponseResultCancelled :: ResponseResult (ResponseType True a)
- ResponseResultReceived :: Show a => a -> ResponseResult (ResponseType cancelable a)
- data CancelInfo (canCancel :: Bool) where
- NonCancelable :: CancelInfo False
- Cancelable :: TVar Bool -> TMVar () -> CancelInfo True
- class MkCancelable (canCancel :: Bool) where
- mkCancelable :: STM (CancelInfo canCancel)
- data Connection = Connection {
- tdsSendPacket :: forall (sender :: Sender) (d :: *) (cancelable :: Bool) (res :: *). (Payload d, Response res, KnownBool cancelable, MkCancelable cancelable) => Packet Client (ExpectsResponse (ResponseType cancelable res)) d Identity -> IO (IO (ResponseResult (ResponseType cancelable res)))
- tdsCancel :: IO ()
- tdsQuit :: IO ()
- tdsConnectionState :: !(TVar ClientState)
- tdsConnectionOptions :: !Options
- getReadyState :: Connection -> IO ClientState
- isConnected :: Connection -> IO Bool
- isReady :: Connection -> IO Bool
- isBusy :: Connection -> IO Bool
- isCancelable :: Connection -> IO Bool
Documentation
data ClientState Source #
Client state type based on recommendation on page 120
Connecting | |
SentPreLogin | |
SentTLSSSLNegotiation | |
SentLogin7WithCompleteAuthenticationToken | |
SentLogin7WithSPNEGO | |
SentLogin7WithFAIR | |
LoggedIn | |
SentClientRequest | |
SentAttention | |
RoutingCompleted | |
Final |
Instances
sendableInState :: PacketType sender resp d -> ClientState -> Bool Source #
stateTransition :: PacketType sender resp d -> ClientState -> ClientState Source #
newtype ConnectionTimeout Source #
Instances
Eq ConnectionTimeout Source # | |
Defined in Database.TDS.Types (==) :: ConnectionTimeout -> ConnectionTimeout -> Bool # (/=) :: ConnectionTimeout -> ConnectionTimeout -> Bool # | |
Ord ConnectionTimeout Source # | |
Defined in Database.TDS.Types compare :: ConnectionTimeout -> ConnectionTimeout -> Ordering # (<) :: ConnectionTimeout -> ConnectionTimeout -> Bool # (<=) :: ConnectionTimeout -> ConnectionTimeout -> Bool # (>) :: ConnectionTimeout -> ConnectionTimeout -> Bool # (>=) :: ConnectionTimeout -> ConnectionTimeout -> Bool # max :: ConnectionTimeout -> ConnectionTimeout -> ConnectionTimeout # min :: ConnectionTimeout -> ConnectionTimeout -> ConnectionTimeout # | |
Show ConnectionTimeout Source # | |
Defined in Database.TDS.Types showsPrec :: Int -> ConnectionTimeout -> ShowS # show :: ConnectionTimeout -> String # showList :: [ConnectionTimeout] -> ShowS # |
connectionTimeout :: ConnectionTimeout Source #
Connection timeout in seconds
Protocol Errors
data TDSErrorType Source #
TDSNoSuchHost | |
TDSSocketError | |
TDSServerUninitialized | |
TDSServerBusy | |
TDSServerQuit | |
TDSInvalidStateTransition | |
TDSInvalidResponse |
Instances
Show TDSErrorType Source # | |
Defined in Database.TDS.Types showsPrec :: Int -> TDSErrorType -> ShowS # show :: TDSErrorType -> String # showList :: [TDSErrorType] -> ShowS # |
TDSError | |
|
Instances
Show TDSError Source # | |
Exception TDSError Source # | |
Defined in Database.TDS.Types toException :: TDSError -> SomeException # fromException :: SomeException -> Maybe TDSError # displayException :: TDSError -> String # |
tdsErrorNoReq :: TDSErrorType -> ClientState -> String -> TDSError Source #
Options
data ConnectionInfo Source #
Instances
Options | |
|
tdsOptionHost :: String -> Options Source #
tdsOptionPort :: Word16 -> Options Source #
tdsOptionDatabase :: Text -> Options Source #
Connection object
data ResponseResult (ty :: ResponseType *) where Source #
ResponseResultCancelled :: ResponseResult (ResponseType True a) | |
ResponseResultReceived :: Show a => a -> ResponseResult (ResponseType cancelable a) |
Instances
Show (ResponseResult ty) Source # | |
Defined in Database.TDS.Types showsPrec :: Int -> ResponseResult ty -> ShowS # show :: ResponseResult ty -> String # showList :: [ResponseResult ty] -> ShowS # |
data CancelInfo (canCancel :: Bool) where Source #
NonCancelable :: CancelInfo False | |
Cancelable :: TVar Bool -> TMVar () -> CancelInfo True |
class MkCancelable (canCancel :: Bool) where Source #
mkCancelable :: STM (CancelInfo canCancel) Source #
Instances
MkCancelable False Source # | |
Defined in Database.TDS.Types mkCancelable :: STM (CancelInfo False) Source # | |
MkCancelable True Source # | |
Defined in Database.TDS.Types mkCancelable :: STM (CancelInfo True) Source # |
data Connection Source #
Connection | |
|
getReadyState :: Connection -> IO ClientState Source #
isConnected :: Connection -> IO Bool Source #
isCancelable :: Connection -> IO Bool Source #