sysdb

package
v0.0.0-...-1fceeaa Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SysDB

type SysDB struct {
	DB *gorm.DB

	TimeStamp  int64
	MyId       uint64
	MyName     string
	MyDeptId   uint64
	MyDeptName string
	// contains filtered or unexported fields
}

func NewSuData

func NewSuData() *SysDB

*

  • 建立系统级运行对象,支持数据库操作、系统用户信息、日志等操作,同时开启数据库事务
  • @param runName 运行名称,用于发生错误时,记录在日志内容中

func (*SysDB) Begin

func (this *SysDB) Begin()

*

  • 开启事务

func (*SysDB) Close

func (this *SysDB) Close()

*

  • 关闭系统级用户的数据库连接,配合Begin的标准用法:
  • su := sysdb.NewSuData()
  • defer sysDB.Close()

func (*SysDB) Commit

func (this *SysDB) Commit()

*

  • 提交事务

Jump to

Keyboard shortcuts

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