mysql

package
v0.0.0-...-aad8f25 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitMysqlPool

func InitMysqlPool(cfg *MysqlCfg)

Types

type MysqlCfg

type MysqlCfg struct {
	Host           string
	Port           int
	Username       string
	Password       string
	Database       string
	ConnectTimeout time.Duration //单个连接超时时间
	MaxConnectNum  int           //最大连接数
	MaxIdleNum     int           //最大连接池空闲数
	ShowSQL        bool          //是否显示sql语句
	Checktime      time.Duration //ping间隔时间
}

type MysqlPool

type MysqlPool struct {
	*xorm.Engine
}

func GetMysqlPool

func GetMysqlPool() *MysqlPool

Jump to

Keyboard shortcuts

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