mysql

package
v0.0.0-...-61e4c6b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDb

func GetDb() *gorm.DB

func Ping

func Ping() error

Types

type ConfigItem

type ConfigItem struct {
	Host     string `json:"host"`
	Port     string `json:"port"`
	User     string `json:"user"`
	Password string `json:"password"`
	Database string `json:"database"`
	Open     int64  `json:"open"`
	Idle     int64  `json:"idle"`
}

type DbInfo

type DbInfo struct {
	DbConfig *ConfigItem
	Conn     *gorm.DB
}

func LoadPgDb

func LoadPgDb() *DbInfo

func (*DbInfo) CheckAndReturnConn

func (info *DbInfo) CheckAndReturnConn() *gorm.DB

func (*DbInfo) InitConnect

func (info *DbInfo) InitConnect()

Jump to

Keyboard shortcuts

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