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: 14 Imported by: 0

Documentation

Overview

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

Index

Constants

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

Variables

This section is empty.

Functions

func AllTypeToInt64

func AllTypeToInt64(s interface{}) (int64, error)

func AllTypeToUInt64

func AllTypeToUInt64(s interface{}) (uint64, error)

func CkDataTypeTransfer

func CkDataTypeTransfer(data interface{}, fieldName string, toDataType string) (v interface{}, e error)

Types

type ClickhouseDB

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

func NewClickHouseDBConn

func NewClickHouseDBConn(uri string) *ClickhouseDB

func (*ClickhouseDB) Close

func (This *ClickhouseDB) Close() bool

func (*ClickhouseDB) Exec

func (This *ClickhouseDB) Exec(sql string, value []driver.Value) error

func (*ClickhouseDB) GetSchemaList

func (This *ClickhouseDB) GetSchemaList() (data []string)

func (*ClickhouseDB) GetSchemaTableList

func (This *ClickhouseDB) GetSchemaTableList(schema string) (data []string)

func (*ClickhouseDB) GetTableDataList

func (This *ClickhouseDB) GetTableDataList(schema string, table string, where string) (data []map[string]driver.Value)

func (*ClickhouseDB) GetTableFields

func (This *ClickhouseDB) GetTableFields(TableName string) (data []ckFieldStruct)

func (*ClickhouseDB) Open

func (This *ClickhouseDB) Open() bool

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, n int) (e error)

func (*Conn) CommitNormal added in v1.2.2

func (This *Conn) CommitNormal(list []*pluginDriver.PluginDataType, n int) (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) Update

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
	CkSchema  string
	CkTable   string

	PriKey []fieldStruct

	Data     *dataTableStruct
	SyncType SyncType
	// contains filtered or unexported fields
}

type SyncType

type SyncType string
const (
	SYNCMODE_NORMAL     SyncType = "Normal"
	SYNCMODE_LOG_UPDATE SyncType = "LogUpdate"
	SYNCMODE_LOG_APPEND SyncType = "insertAll"
)

Jump to

Keyboard shortcuts

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