mysql

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(config *Config)

Init mysql初始化

func InitTable added in v1.0.5

func InitTable() error

func New

func New() (*gorm.DB, error)

New 创建实例

Types

type Config

type Config struct {
	ConnString      string
	ConnMaxLifetime int64 //ConnMaxLifetime 最大连接时间,单位:小时
	MaxIdleConns    int
	MaxOpenConns    int
	InitTable       bool
}

Jump to

Keyboard shortcuts

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