You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
534 B
Go

1 year ago
package binlog
import (
1 year ago
"fmt"
1 year ago
"testing"
1 year ago
"time"
1 year ago
)
func TestParse(t *testing.T) {
1 year ago
ParseBinlogFile("./test/mysql-bin.000023", func(transaction Transaction) {
fmt.Println(transaction)
})
}
func TestParseFilter(t *testing.T) {
ParseBinlogWithFilter("./test/mysql-bin.000023", 0, BinlogFilter{
IncludeGtid: "",
ExcludeGtid: "",
StartPos: 0,
EndPos: 0,
StartDate: time.Time{},
EndDate: time.Time{},
BigThan: 0,
SmallThan: 0,
}, func(transaction Transaction) {
1 year ago
fmt.Println(transaction)
})
1 year ago
}