gormutil

package
v1.3.19 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 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 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