sql

package
v0.0.0-...-6ff2234 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: MIT Imports: 5 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(c *Config) *MySQL

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