Documentation
¶
Index ¶
- Variables
- func Parse(r io.Reader, h ParseHandler, parseBinlogPos bool) error
- type Dumper
- func (d *Dumper) AddDatabases(dbs ...string)
- func (d *Dumper) AddIgnoreTables(db string, tables ...string)
- func (d *Dumper) AddTables(db string, tables ...string)
- func (d *Dumper) Dump(w io.Writer) error
- func (d *Dumper) DumpAndParse(h ParseHandler) error
- func (d *Dumper) Reset()
- func (d *Dumper) SetCharset(charset string)
- func (d *Dumper) SetErrOut(o io.Writer)
- func (d *Dumper) SetExtraOptions(options []string)
- func (d *Dumper) SetHexBlob(v bool)
- func (d *Dumper) SetMaxAllowedPacket(i int)
- func (d *Dumper) SetProtocol(protocol string)
- func (d *Dumper) SetWhere(where string)
- func (d *Dumper) SkipMasterData(v bool)
- type ParseHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrSkip = errors.New("Handler error, but skipped")
)
Functions ¶
Types ¶
type Dumper ¶
type Dumper struct {
// mysqldump execution path, like mysqldump or /usr/bin/mysqldump, etc...
ExecutionPath string
Addr string
User string
Password string
Protocol string
// Will override Databases
Tables []string
TableDB string
Databases []string
Where string
Charset string
IgnoreTables map[string][]string
ExtraOptions []string
ErrOut io.Writer
// contains filtered or unexported fields
}
Unlick mysqldump, Dumper is designed for parsing and syning data easily.
func (*Dumper) AddDatabases ¶
func (*Dumper) AddIgnoreTables ¶
func (*Dumper) DumpAndParse ¶
func (d *Dumper) DumpAndParse(h ParseHandler) error
DumpAndParse: Dump MySQL and parse immediately
func (*Dumper) SetCharset ¶
func (*Dumper) SetExtraOptions ¶
func (*Dumper) SetHexBlob ¶
func (*Dumper) SetMaxAllowedPacket ¶
func (*Dumper) SetProtocol ¶
func (*Dumper) SkipMasterData ¶
SkipMasterData: In some cloud MySQL, we have no privilege to use `--master-data`.
Click to show internal directories.
Click to hide internal directories.