db

package
v0.0.0-...-f615dff Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMySQLClient

func NewMySQLClient(opts *MySQLOptions) (*gorm.DB, error)

NewMySQLClient 通过MysqlOptions struct做传值

Types

type MySQLOptions

type MySQLOptions struct {
	Host     string
	UserName string
	Password string
	Database string

	MaxIdleConnections    int
	MaxOpenConnections    int
	MaxConnectionLifeTime time.Duration
	MaxConnectionIdleTime time.Duration

	LogLevel int
}

Jump to

Keyboard shortcuts

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