mysql-haskell-0.8.3.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 Source #

MySQL packet type

Constructors

Packet 

Fields

Instances

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

Eq OK Source # 

Methods

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

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

Show OK Source # 

Methods

showsPrec :: Int -> OK -> ShowS #

show :: OK -> String #

showList :: [OK] -> ShowS #

Binary OK Source # 

Methods

put :: OK -> Put #

get :: Get OK #

putList :: [OK] -> Put #

data ERR Source #

Constructors

ERR 

Instances

Eq ERR Source # 

Methods

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

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

Show ERR Source # 

Methods

showsPrec :: Int -> ERR -> ShowS #

show :: ERR -> String #

showList :: [ERR] -> ShowS #

Binary ERR Source # 

Methods

put :: ERR -> Put #

get :: Get ERR #

putList :: [ERR] -> Put #

data EOF Source #

Constructors

EOF 

Instances

Eq EOF Source # 

Methods

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

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

Show EOF Source # 

Methods

showsPrec :: Int -> EOF -> ShowS #

show :: EOF -> String #

showList :: [EOF] -> ShowS #

Binary EOF Source # 

Methods

put :: EOF -> Put #

get :: Get EOF #

putList :: [EOF] -> Put #