sql

package
v0.0.0-...-1441d4d Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RowsNotAffectedErr = fmt.Errorf("rows not affected")

Functions

This section is empty.

Types

type Config

type Config struct {
	DSN    string // write data source name.
	BizTag string
}

Config sql config.

type MySQL

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

func NewMySQL

func NewMySQL(db *sql.DB, bizTag string, step int) (mysql *MySQL, cf func(), err error)

NewMySQL new db and retry connection when has error.

func (*MySQL) GetEndID

func (m *MySQL) GetEndID(ctx context.Context) (startID uint64, endID uint64, step int, err error)

func (*MySQL) InitBizTag

func (m *MySQL) InitBizTag(ctx context.Context, bizTag string, maxID uint64, step int, description string) error

Jump to

Keyboard shortcuts

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