mysql-haskell-1.1.5: pure haskell MySQL driver
Copyright(c) Winterland 2016
LicenseBSD
Maintainerdrkoster@qq.com
Stabilityexperimental
PortabilityPORTABLE
Safe HaskellSafe-Inferred
LanguageHaskell2010

Database.MySQL.Protocol.Packet

Description

MySQL packet decoder&encoder, and varities utility.

Synopsis

Documentation

data Packet Source #

MySQL packet type

Constructors

Packet 

Fields

Instances

Instances details
Show Packet Source # 
Instance details

Defined in Database.MySQL.Protocol.Packet

Binary Packet Source # 
Instance details

Defined in Database.MySQL.Protocol.Packet

Methods

put :: Packet -> Put #

get :: Get Packet #

putList :: [Packet] -> Put #

Eq Packet Source # 
Instance details

Defined in Database.MySQL.Protocol.Packet

Methods

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

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

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

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.

data OK Source #

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

Constructors

OK 

Fields

Instances

Instances details
Show OK Source # 
Instance details

Defined in Database.MySQL.Protocol.Packet

Methods

showsPrec :: Int -> OK -> ShowS #

show :: OK -> String #

showList :: [OK] -> ShowS #

Binary OK Source # 
Instance details

Defined in Database.MySQL.Protocol.Packet

Methods

put :: OK -> Put #

get :: Get OK #

putList :: [OK] -> Put #

Eq OK Source # 
Instance details

Defined in Database.MySQL.Protocol.Packet

Methods

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

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

data ERR Source #

Constructors

ERR 

Instances

Instances details
Show ERR Source # 
Instance details

Defined in Database.MySQL.Protocol.Packet

Methods

showsPrec :: Int -> ERR -> ShowS #

show :: ERR -> String #

showList :: [ERR] -> ShowS #

Binary ERR Source # 
Instance details

Defined in Database.MySQL.Protocol.Packet

Methods

put :: ERR -> Put #

get :: Get ERR #

putList :: [ERR] -> Put #

Eq ERR Source # 
Instance details

Defined in Database.MySQL.Protocol.Packet

Methods

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

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

data EOF Source #

Constructors

EOF 

Instances

Instances details
Show EOF Source # 
Instance details

Defined in Database.MySQL.Protocol.Packet

Methods

showsPrec :: Int -> EOF -> ShowS #

show :: EOF -> String #

showList :: [EOF] -> ShowS #

Binary EOF Source # 
Instance details

Defined in Database.MySQL.Protocol.Packet

Methods

put :: EOF -> Put #

get :: Get EOF #

putList :: [EOF] -> Put #

Eq EOF Source # 
Instance details

Defined in Database.MySQL.Protocol.Packet

Methods

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

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