gormutil

package
v1.3.28 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteCallback

func DeleteCallback(db *gorm.DB)

DeleteCallback 自定义删除时间标记

func QueryCallback

func QueryCallback(db *gorm.DB)

QueryCallback 自定义查询时间标记

func RegisterCartimeCallbacks added in v1.3.23

func RegisterCartimeCallbacks(db *gorm.DB) error

RegisterCartimeCallbacks cartime注入 替换掉原来的时间戳

func RollBackFn added in v1.3.8

func RollBackFn(tx *gorm.DB, me e.Err, err *error)

func UpdateCallback

func UpdateCallback(db *gorm.DB)

UpdateCallback 自定义更新时间标记

Types

type Paging

type Paging struct {
	Page  int64 `json:"page"`  //页数
	Size  int64 `json:"size"`  //单页大小
	Order int32 `json:"order"` //排序
}

func (*Paging) Offset

func (p *Paging) Offset() int

Jump to

Keyboard shortcuts

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