db

package
v0.0.0-...-45471de Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GormEngine *gorm.DB

	SqlDB       *sql.DB
	MySQLClient MySQLClientEngine
)

Functions

func InitConfig

func InitConfig()

func InitGormEngine

func InitGormEngine()

func InitMySQLClient

func InitMySQLClient()

Types

type MySQLClientEngine

type MySQLClientEngine struct {
	*gorm.DB
}

func (*MySQLClientEngine) ReadOnlyTransaction

func (engine *MySQLClientEngine) ReadOnlyTransaction(f func(tx *gorm.DB) (interface{}, error)) (interface{}, error)

func (*MySQLClientEngine) ReadWriteTransaction

func (engine *MySQLClientEngine) ReadWriteTransaction(f func(tx *gorm.DB, in interface{}) (interface{}, error), in interface{}) (interface{}, error)

Jump to

Keyboard shortcuts

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