mysql

package
v0.0.0-...-b81b3d3 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB
View Source
var GormLoggerCfg = glog.Config{
	SlowThreshold:             time.Second,
	LogLevel:                  glog.Silent,
	IgnoreRecordNotFoundError: true,
	Colorful:                  false,
}

Functions

func NewMysqlDB

func NewMysqlDB(config *configs.Mysql) error

Types

type GormLogger

type GormLogger struct {
	Log *zap.SugaredLogger
}

func (*GormLogger) Printf

func (c *GormLogger) Printf(format string, args ...interface{})

func (*GormLogger) WithLog

func (c *GormLogger) WithLog() *gorm.DB

Jump to

Keyboard shortcuts

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