Copyright | (c) Winterland 2016 |
---|---|
License | BSD |
Maintainer | drkoster@qq.com |
Stability | experimental |
Portability | PORTABLE |
Safe Haskell | None |
Language | Haskell2010 |
This module provide column meta decoder for binlog protocol.
There're certain type won't appear in binlog event, and some types are compressed into mySQLTypeString
, please take python version as a reference: https://github.com/noplay/python-mysql-replication
You will not directly meet following FieldType
namely:
- mySQLTypeDecimal
- mySQLTypeNewdate
- mySQLTypeEnum
- mySQLTypeSet
- mySQLTypeTinyBlob
- mySQLTypeMediumBlOb
- mySQLTypeLongBlob
Synopsis
- data BinLogMeta
- = BINLOG_TYPE_TINY
- | BINLOG_TYPE_SHORT
- | BINLOG_TYPE_INT24
- | BINLOG_TYPE_LONG
- | BINLOG_TYPE_LONGLONG
- | BINLOG_TYPE_FLOAT !Word8
- | BINLOG_TYPE_DOUBLE !Word8
- | BINLOG_TYPE_BIT !Word16 !Word8
- | BINLOG_TYPE_TIMESTAMP
- | BINLOG_TYPE_DATETIME
- | BINLOG_TYPE_DATE
- | BINLOG_TYPE_TIME
- | BINLOG_TYPE_TIMESTAMP2 !Word8
- | BINLOG_TYPE_DATETIME2 !Word8
- | BINLOG_TYPE_TIME2 !Word8
- | BINLOG_TYPE_YEAR
- | BINLOG_TYPE_NEWDECIMAL !Word8 !Word8
- | BINLOG_TYPE_ENUM !Word8
- | BINLOG_TYPE_SET !Word16 !Word8
- | BINLOG_TYPE_BLOB !Word8
- | BINLOG_TYPE_STRING !Word16
- | BINLOG_TYPE_GEOMETRY !Word8
- getBinLogMeta :: FieldType -> Get BinLogMeta
Documentation
data BinLogMeta Source #
An intermedia date type for decoding row-based event's values.
BINLOG_TYPE_TINY | |
BINLOG_TYPE_SHORT | |
BINLOG_TYPE_INT24 | |
BINLOG_TYPE_LONG | |
BINLOG_TYPE_LONGLONG | |
BINLOG_TYPE_FLOAT !Word8 | size |
BINLOG_TYPE_DOUBLE !Word8 | size |
BINLOG_TYPE_BIT !Word16 !Word8 | bits, bytes |
BINLOG_TYPE_TIMESTAMP | |
BINLOG_TYPE_DATETIME | |
BINLOG_TYPE_DATE | |
BINLOG_TYPE_TIME | |
BINLOG_TYPE_TIMESTAMP2 !Word8 | fsp |
BINLOG_TYPE_DATETIME2 !Word8 | fsp |
BINLOG_TYPE_TIME2 !Word8 | fsp |
BINLOG_TYPE_YEAR | |
BINLOG_TYPE_NEWDECIMAL !Word8 !Word8 | precision, scale |
BINLOG_TYPE_ENUM !Word8 | |
BINLOG_TYPE_SET !Word16 !Word8 | bitmap bits, bytes |
BINLOG_TYPE_BLOB !Word8 | length size |
BINLOG_TYPE_STRING !Word16 | meta length(if < 256, then length is 8bit, if > 256 then length is 16bit) |
BINLOG_TYPE_GEOMETRY !Word8 | length size |
Instances
Eq BinLogMeta Source # | |
Defined in Database.MySQL.BinLogProtocol.BinLogMeta (==) :: BinLogMeta -> BinLogMeta -> Bool # (/=) :: BinLogMeta -> BinLogMeta -> Bool # | |
Show BinLogMeta Source # | |
Defined in Database.MySQL.BinLogProtocol.BinLogMeta showsPrec :: Int -> BinLogMeta -> ShowS # show :: BinLogMeta -> String # showList :: [BinLogMeta] -> ShowS # |
getBinLogMeta :: FieldType -> Get BinLogMeta Source #