mysql

package
v0.0.0-...-378a548 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DSN     string
	MinOpen int = 5
	MaxOpen int = 10
	DB      *sql.DB

	RetryTimes = 3
	Period     = 10 * time.Second
)
View Source
var DefaultConnectTimeout = 5 * time.Second

Functions

func Close

func Close() error

Close close mysql

func Connect

func Connect() error

Build build mysql

Types

type Exec

type Exec interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

Exec exec mysql

Jump to

Keyboard shortcuts

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