gormutil

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCallback

func CreateCallback(db *gorm.DB)

CreateCallback 自定义创建时间标记

func DeleteCallback

func DeleteCallback(db *gorm.DB)

DeleteCallback 自定义删除时间标记

func QueryCallback

func QueryCallback(db *gorm.DB)

QueryCallback 自定义查询时间标记

func RegisterCallbacks

func RegisterCallbacks(db *gorm.DB) error

func RollBackFn

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