db

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

*

  • @Time : 2020/12/17 1:47 下午
  • @Author : MassAdobe
  • @Description: db

*

Index

Constants

View Source
const (
	DB_SQL = "sql"
	DB_LOG = "log"
)

Variables

View Source
var (
	Read  *gorm.DB // 读库
	Write *gorm.DB // 写库
)

*

  • @Author: MassAdobe
  • @TIME: 2020/12/17 1:49 下午
  • @Description: 数据库实体类

*

Functions

func CloseDb added in v1.2.0

func CloseDb()

*

  • @Author: MassAdobe
  • @TIME: 2020/12/28 2:29 下午
  • @Description: 关停数据库连接池,释放句柄

*

func InitDB

func InitDB()

*

  • @Author: MassAdobe
  • @TIME: 2020/12/17 1:49 下午
  • @Description: 初始化数据库

*

Types

type DbLog added in v1.2.0

type DbLog struct{}

*

  • @Author: MassAdobe
  • @TIME: 2020/12/31 1:07 下午
  • @Description: 数据库日志实体类

*

func (*DbLog) Print added in v1.2.0

func (logger *DbLog) Print(values ...interface{})

*

  • @Author: MassAdobe
  • @TIME: 2020/12/31 1:07 下午
  • @Description: 数据库日志方法

*

Jump to

Keyboard shortcuts

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