Documentation
¶
Overview ¶
普通模式同步 update 转成 insert on update insert 转成 replace into delete 转成 delete 只要是同一条数据,只要有遍历过,后面遍历出来的数据,则不再进行操作
Index ¶
- Constants
- func AllTypeToInt64(s interface{}) (int64, error)
- func AllTypeToUInt64(s interface{}) (uint64, error)
- func CkDataTypeTransfer(data interface{}, fieldName string, toDataType string, ...) (v interface{}, e error)
- func TransferToCreateDatabaseSql(SchemaName string) (sql string)
- func TransferToCreateTableSql(SchemaName, TableName string, data map[string]interface{}, Pri []*string) (sql string, ckField []fieldStruct)
- type ClickhouseDB
- func (This *ClickhouseDB) Close() bool
- func (This *ClickhouseDB) Exec(sql string, value []driver.Value) error
- func (This *ClickhouseDB) GetConn() clickhouse.Clickhouse
- func (This *ClickhouseDB) GetSchemaList() (data []string)
- func (This *ClickhouseDB) GetSchemaTableList(schema string) (data []string)
- func (This *ClickhouseDB) GetTableDataList(schema string, table string, where string) (data []map[string]driver.Value)
- func (This *ClickhouseDB) GetTableFields(SchemaName, TableName string) (data []ckFieldStruct)
- func (This *ClickhouseDB) Open() bool
- type Conn
- func (This *Conn) AutoCreateTableCommit(list []*pluginDriver.PluginDataType, n int)
- func (This *Conn) Close() bool
- func (This *Conn) Commit() (b *pluginDriver.PluginBinlog, e error)
- func (This *Conn) CommitLogMod_Append(list []*pluginDriver.PluginDataType, n int) (e error)
- func (This *Conn) CommitNormal(list []*pluginDriver.PluginDataType, n int) (e error)
- func (This *Conn) Connect() bool
- func (This *Conn) CreateCkDatabase(SchemaName string) (err error)
- func (This *Conn) CreateCkTable(data *pluginDriver.PluginDataType) (ckField []fieldStruct, err error)
- func (This *Conn) Del(data *pluginDriver.PluginDataType) (*pluginDriver.PluginBinlog, error)
- func (This *Conn) GetConnStatus() string
- func (This *Conn) GetParam(p interface{}) (*PluginParam, error)
- func (This *Conn) HeartCheck()
- func (This *Conn) Insert(data *pluginDriver.PluginDataType) (*pluginDriver.PluginBinlog, error)
- func (This *Conn) NotCreateTableCommit(list []*pluginDriver.PluginDataType, n int)
- func (This *Conn) Query(data *pluginDriver.PluginDataType) (*pluginDriver.PluginBinlog, error)
- func (This *Conn) ReConnect() bool
- func (This *Conn) SetConnStatus(status string)
- func (This *Conn) SetParam(p interface{}) (interface{}, error)
- func (This *Conn) Update(data *pluginDriver.PluginDataType) (*pluginDriver.PluginBinlog, error)
- type MyConn
- type PluginParam
- type PluginParam0
- type SyncType
Constants ¶
View Source
const BIFROST_VERION = "v1.5.0"
View Source
const VERSION = "v1.5.0"
Variables ¶
This section is empty.
Functions ¶
func AllTypeToInt64 ¶
func AllTypeToUInt64 ¶
func CkDataTypeTransfer ¶
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) GetConn ¶
func (This *ClickhouseDB) GetConn() clickhouse.Clickhouse
func (*ClickhouseDB) GetSchemaList ¶
func (This *ClickhouseDB) GetSchemaList() (data []string)
func (*ClickhouseDB) GetSchemaTableList ¶
func (This *ClickhouseDB) GetSchemaTableList(schema string) (data []string)
func (*ClickhouseDB) GetTableDataList ¶
func (*ClickhouseDB) GetTableFields ¶
func (This *ClickhouseDB) GetTableFields(SchemaName, TableName string) (data []ckFieldStruct)
func (*ClickhouseDB) Open ¶
func (This *ClickhouseDB) Open() bool
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func (*Conn) AutoCreateTableCommit ¶
func (This *Conn) AutoCreateTableCommit(list []*pluginDriver.PluginDataType, n int)
自动创建表的提交
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) CreateCkDatabase ¶
通过数据自动创建 ck 库
func (*Conn) CreateCkTable ¶
func (This *Conn) CreateCkTable(data *pluginDriver.PluginDataType) (ckField []fieldStruct, err error)
通过数据自动创建 ck 表
func (*Conn) Del ¶
func (This *Conn) Del(data *pluginDriver.PluginDataType) (*pluginDriver.PluginBinlog, error)
func (*Conn) GetConnStatus ¶
func (*Conn) GetParam ¶
func (This *Conn) GetParam(p interface{}) (*PluginParam, error)
func (*Conn) HeartCheck ¶
func (This *Conn) HeartCheck()
func (*Conn) Insert ¶
func (This *Conn) Insert(data *pluginDriver.PluginDataType) (*pluginDriver.PluginBinlog, error)
func (*Conn) NotCreateTableCommit ¶
func (This *Conn) NotCreateTableCommit(list []*pluginDriver.PluginDataType, n int)
非自动创建表的提交
func (*Conn) Query ¶
func (This *Conn) Query(data *pluginDriver.PluginDataType) (*pluginDriver.PluginBinlog, error)
func (*Conn) SetConnStatus ¶
func (*Conn) Update ¶
func (This *Conn) Update(data *pluginDriver.PluginDataType) (*pluginDriver.PluginBinlog, error)
type PluginParam ¶
type PluginParam struct { Field []fieldStruct BatchSize int CkSchema string CkTable string PriKey []fieldStruct Data *dataTableStruct SyncType SyncType AutoCreateTable bool NullNotTransferDefault bool //是否将null值强制转成相对应类型的默认值 , false 将 null 转成相对就的 0 或者 "" , true 不进行转换,为了兼容老版本,才反过来的 // contains filtered or unexported fields }
type PluginParam0 ¶
Click to show internal directories.
Click to hide internal directories.