mysql-haskell-0.8.0.0: pure haskell MySQL driver

Copyright(c) Winterland 2016
LicenseBSD
Maintainerdrkoster@qq.com
Stabilityexperimental
PortabilityPORTABLE
Safe HaskellNone
LanguageHaskell2010

Database.MySQL.Protocol.Packet

Description

MySQL packet decoder&encoder, and varities utility.

Synopsis

Documentation

data Packet #

MySQL packet type

Constructors

Packet 

Fields

Instances

Eq Packet # 

Methods

(==) :: Packet -> Packet -> Bool #

(/=) :: Packet -> Packet -> Bool #

Show Packet # 
Binary Packet # 

Methods

put :: Packet -> Put #

get :: Get Packet #

putList :: [Packet] -> Put #

decodeFromPacket :: Binary a => Packet -> IO a #

Decoding packet inside IO, throw DecodePacketException on fail parsing, here we choose stability over correctness by omit incomplete consumed case: if we successful parse a packet, then we don't care if there're bytes left.

getFromPacket :: Get a -> Packet -> IO a #

data OK #

You may get interested in OK packet because it provides information about successful operations.

Constructors

OK 

Fields

Instances

Eq OK # 

Methods

(==) :: OK -> OK -> Bool #

(/=) :: OK -> OK -> Bool #

Show OK # 

Methods

showsPrec :: Int -> OK -> ShowS #

show :: OK -> String #

showList :: [OK] -> ShowS #

Binary OK # 

Methods

put :: OK -> Put #

get :: Get OK #

putList :: [OK] -> Put #

putOK :: OK -> Put #

data ERR #

Constructors

ERR 

Instances

Eq ERR # 

Methods

(==) :: ERR -> ERR -> Bool #

(/=) :: ERR -> ERR -> Bool #

Show ERR # 

Methods

showsPrec :: Int -> ERR -> ShowS #

show :: ERR -> String #

showList :: [ERR] -> ShowS #

Binary ERR # 

Methods

put :: ERR -> Put #

get :: Get ERR #

putList :: [ERR] -> Put #

putERR :: ERR -> Put #

data EOF #

Constructors

EOF 

Instances

Eq EOF # 

Methods

(==) :: EOF -> EOF -> Bool #

(/=) :: EOF -> EOF -> Bool #

Show EOF # 

Methods

showsPrec :: Int -> EOF -> ShowS #

show :: EOF -> String #

showList :: [EOF] -> ShowS #

Binary EOF # 

Methods

put :: EOF -> Put #

get :: Get EOF #

putList :: [EOF] -> Put #

putEOF :: EOF -> Put #