mysql

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotInitDBErr = errors.New("db not init")
)

Functions

func Conn

func Conn(opfs ...OpFun) (*gorm.DB, error)

func DB added in v0.4.6

func DB(dbName string) (*gorm.DB, error)

Types

type OpFun added in v0.4.6

type OpFun func(opt *Option)

type Option

type Option struct {
	Addr             string
	User             string
	Password         string
	Database         string
	MaxIdleConns     int
	MaxOpenConns     int
	ConnMaxLifetime  time.Duration
	LogSlowThreshold time.Duration
}

Jump to

Keyboard shortcuts

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