db

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Db      = initialize.Db
	InitDb  = Db.Session(&gorm.Session{Logger: Db.Logger.LogMode(logger.Silent)})
	Context *cus.DbContext
)

Functions

func AddCommitCallback

func AddCommitCallback(parent context.Context, callbacks ...cus.TxCommitCallback) error

AddCommitCallback Transaction needs to be called before using this method

func Get

func Get(ctx context.Context) *gorm.DB

func Transaction

func Transaction(parent context.Context, fc TxFunc) error

Types

type TxFunc

type TxFunc func(ctx *cus.TxContext) error

Jump to

Keyboard shortcuts

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