src

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

日志模式同步 update 转成 insert on update insert 转成 replace into delete 转成 insert on update 只要是同一条数据,只要有遍历过,后面遍历出来的数据,则不再进行操作

普通模式同步 update 转成 insert on update insert 转成 replace into delete 转成 delete 只要是同一条数据,只要有遍历过,后面遍历出来的数据,则不再进行操作

Index

Constants

View Source
const BIFROST_VERION = "v1.2.1"
View Source
const VERSION = "v1.2.1"

Variables

This section is empty.

Functions

func NewMysqlDBConn

func NewMysqlDBConn(uri string) *mysqlDB

Types

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func (*Conn) Close

func (This *Conn) Close() bool

func (*Conn) Commit

func (This *Conn) Commit() (b *pluginDriver.PluginBinlog, e error)

func (*Conn) CommitLogMod_Append added in v1.2.2

func (This *Conn) CommitLogMod_Append(list []*pluginDriver.PluginDataType) (e error)

func (*Conn) CommitLogMod_Update added in v1.2.2

func (This *Conn) CommitLogMod_Update(list []*pluginDriver.PluginDataType) (e error)

func (*Conn) CommitNormal added in v1.2.2

func (This *Conn) CommitNormal(list []*pluginDriver.PluginDataType) (e error)

func (*Conn) Connect

func (This *Conn) Connect() bool

func (*Conn) Del

func (*Conn) GetConnStatus

func (This *Conn) GetConnStatus() string

func (*Conn) GetParam

func (This *Conn) GetParam(p interface{}) (*PluginParam, error)

func (*Conn) HeartCheck

func (This *Conn) HeartCheck()

func (*Conn) Insert

func (*Conn) Query

func (*Conn) ReConnect

func (This *Conn) ReConnect() bool

func (*Conn) SetConnStatus

func (This *Conn) SetConnStatus(status string)

func (*Conn) SetParam

func (This *Conn) SetParam(p interface{}) (interface{}, error)

func (*Conn) StmtClose added in v1.2.2

func (This *Conn) StmtClose()

func (*Conn) Update

type EventType

type EventType int8
const (
	INSERT         EventType = 0
	UPDATE         EventType = 1
	DELETE         EventType = 2
	REPLACE_INSERT EventType = 3
	SQLTYPE        EventType = 4
)

type MyConn

type MyConn struct{}

func (*MyConn) CheckUri

func (MyConn *MyConn) CheckUri(uri string) error

func (*MyConn) GetUriExample

func (MyConn *MyConn) GetUriExample() string

func (*MyConn) Open

func (MyConn *MyConn) Open(uri string) pluginDriver.ConnFun

type PluginParam

type PluginParam struct {
	Field     []fieldStruct
	BatchSize int
	Schema    string
	Table     string
	Datakey   string

	PriKey []fieldStruct

	Data *dataTableStruct

	NullTransferDefault bool //是否将null值强制转成相对应类型的默认值
	SyncMode            SyncMode
	// contains filtered or unexported fields
}

type SyncMode added in v1.2.2

type SyncMode string
const (
	SYNCMODE_NORMAL     SyncMode = "Normal"
	SYNCMODE_LOG_UPDATE SyncMode = "LogUpdate"
	SYNCMODE_LOG_APPEND SyncMode = "LogAppend"
)

type TableStruct

type TableStruct struct {
	COLUMN_NAME       string
	COLUMN_DEFAULT    *string
	IS_NULLABLE       string
	COLUMN_TYPE       string
	COLUMN_KEY        string
	EXTRA             string
	COLUMN_COMMENT    string
	DATA_TYPE         string
	NUMERIC_PRECISION *uint64
	NUMERIC_SCALE     *uint64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL