add more info
This commit is contained in:
parent
b981b331e8
commit
393275a195
32
parse.go
32
parse.go
@ -12,13 +12,15 @@ import (
|
||||
)
|
||||
|
||||
type TxDetail struct {
|
||||
StartPos int
|
||||
EndPos int
|
||||
RowCount int
|
||||
Sql string
|
||||
Db string
|
||||
Table string
|
||||
SqlType string
|
||||
StartPos int
|
||||
EndPos int
|
||||
RowCount int
|
||||
Timestamp int64
|
||||
Time time.Time
|
||||
Sql string
|
||||
Db string
|
||||
Table string
|
||||
SqlType string
|
||||
}
|
||||
|
||||
type Transaction struct {
|
||||
@ -189,13 +191,15 @@ func parseBinlogDetail(r io.Reader, f func(Transaction)) error {
|
||||
default:
|
||||
tx.EndPos = int(h.LogPos)
|
||||
tx.Txs = append(tx.Txs, TxDetail{
|
||||
StartPos: startPos,
|
||||
EndPos: int(h.LogPos),
|
||||
Db: db,
|
||||
Table: tb,
|
||||
Sql: sql,
|
||||
SqlType: sqlType,
|
||||
RowCount: int(rowCnt),
|
||||
StartPos: startPos,
|
||||
EndPos: int(h.LogPos),
|
||||
Db: db,
|
||||
Table: tb,
|
||||
Sql: sql,
|
||||
SqlType: sqlType,
|
||||
RowCount: int(rowCnt),
|
||||
Timestamp: int64(h.Timestamp),
|
||||
Time: time.Unix(int64(h.Timestamp), 0),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user