mysql

package
v1.2.27-betax17 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	//ErrDBConn ...
	ErrDBConn = "db_err_conn"
	//ErrDBRead ...
	ErrDBRead = "db_err_read"
	//ErrDBInsert ...
	ErrDBInsert = "db_err_insert"
	//ErrDBUpdate ...
	ErrDBUpdate = "db_err_update"
	//ErrDBWrite ...
	ErrDBWrite = "db_err_write"
	//ErrDBSQL ...
	ErrDBSQL = "db_err_write"
	//ErrDBTxn ...
	ErrDBTxn = "db_err_txn"
)

Variables

This section is empty.

Functions

func Init

func Init(option Option) (*sql.DB, error)

Init ...

func WriteDBError

func WriteDBError(ctx context.Context, logger logging.IDotpeLogger, err error, db, etype string)

WriteDBError ...

Types

type Option

type Option struct {
	Host,
	Port,
	User,
	Pass,
	DB string

	MaxOpenConnection,
	MaxIdleConnection int
	MaxConnectionTimeOut time.Duration
}

Option ...

Jump to

Keyboard shortcuts

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