mysql

package
v0.0.0-...-01f7578 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(DBHost string, DBPort int, DBUserName string, DBPassword string, DBDatabaseName string, options ...mysqlOption) (*gorm.DB, error)

func SetConnMaxLifetime

func SetConnMaxLifetime(conns int) mysqlOption

func SetMaxIdleConns

func SetMaxIdleConns(conns int) mysqlOption

func SetMaxOpenConns

func SetMaxOpenConns(conns int) mysqlOption

func SetNamingStrategy

func SetNamingStrategy(namingStrategy schema.Namer) mysqlOption

func SetPrintLog

func SetPrintLog(isenable bool, level logger.LogLevel, latencyThreshold time.Duration) mysqlOption

SetPrintLog level: 1=silent, 2=Error, 3=Warn, 4=Info. latencyThreshold: suggestion 200ms.

Types

This section is empty.

Jump to

Keyboard shortcuts

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