database

package
v0.0.0-...-c1f4788 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyCallback

func ApplyCallback(db *gorm.DB, callback Callback)

Types

type Callback

type Callback interface {
	Name() string
	BeforeQuery(s *gorm.Scope)
	AfterQuery(s *gorm.Scope)
	BeforeRowQuery(s *gorm.Scope)
	AfterRowQuery(s *gorm.Scope)
	BeforeCreate(s *gorm.Scope)
	AfterCreate(s *gorm.Scope)
	BeforeUpdate(s *gorm.Scope)
	AfterUpdate(s *gorm.Scope)
	BeforeDelete(s *gorm.Scope)
	AfterDelete(s *gorm.Scope)
}

func NewLoggerCallback

func NewLoggerCallback(l *zap.Logger, options xsql.ConnectionOptions) Callback

func NewMetricCallback

func NewMetricCallback(options xsql.ConnectionOptions, timerKey string) Callback

Jump to

Keyboard shortcuts

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