xmysql

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

功能:gorm打开mysql数据库连接池,并且配置连接池参数 说明:

功能:gorm打开mysql数据库连接池,并且配置连接池参数 说明:

功能:mysql事务 说明:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mysql_transaction

func Mysql_transaction(db *gorm.DB, transFunc func(*gorm.DB) error) (err error)

Mysql_transaction mysql事务

func Open_gorm_config_conn_pool

func Open_gorm_config_conn_pool(source string, mysql_logger logger.Interface, option *GormOption) (*gorm.DB, func(), error)

Open_gorm_config_conn_pool 打开gorm连接池,并且配置

Types

type GormOption

type GormOption struct {
	Max_lifetime   int `toml:"max_lifetime"`
	Max_open_conns int `toml:"max_open_conns"`
	Max_idle_conns int `toml:"max_idle_conns"`
}

Directories

Path Synopsis
功能:mysql操作对应的文件日志 说明:
功能:mysql操作对应的文件日志 说明:

Jump to

Keyboard shortcuts

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