orm

package
v0.0.0-...-6e4d488 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(db *gorm.DB, cud ADDFunc) (uint, error)

Add 添加

func Create

func Create(db *gorm.DB, cud CUDFunc) (uint, error)

Create 添加

func CreateUuid

func CreateUuid(db *gorm.DB, cud CUDUUIDFunc) (string, error)

CreateUuid 添加

func Delete

func Delete(db *gorm.DB, id uint, cud CUDFunc) error

Delete // 删除

func First

func First(db *gorm.DB, rf ResponseFunc, scopes ...func(db *gorm.DB) *gorm.DB) error

func Paginate

func Paginate(db *gorm.DB, prf PageResponseFunc, scopes ...func(db *gorm.DB) *gorm.DB) (int64, error)

Paginate 分页

func Update

func Update(db *gorm.DB, id uint, cud CUDFunc) error

Update 更新

func UpdatePw

func UpdatePw(db *gorm.DB, mobile string, cud CUDUUIDFunc) error

UpdatePw 更新

Types

type ADDFunc

type ADDFunc interface {
	Add(db *gorm.DB) (uint, error)
}

ADDFunc 增改删接口

type CUDFunc

type CUDFunc interface {
	Create(db *gorm.DB) (uint, error)
	Update(db *gorm.DB, scopes ...func(db *gorm.DB) *gorm.DB) error
	Delete(db *gorm.DB, scopes ...func(db *gorm.DB) *gorm.DB) error
}

CUDFunc 增改删接口

type CUDUUIDFunc

type CUDUUIDFunc interface {
	CreateUuid(db *gorm.DB) (string, error)
	UpdatePw(db *gorm.DB, scopes ...func(db *gorm.DB) *gorm.DB) error
}

CUDUUIDFunc 增改删接口

type PageResponseFunc

type PageResponseFunc interface {
	Paginate(db *gorm.DB, scopes ...func(db *gorm.DB) *gorm.DB) (int64, error)
}

PageResponseFunc 分页接口

type ResponseFunc

type ResponseFunc interface {
	First(db *gorm.DB, scopes ...func(db *gorm.DB) *gorm.DB) error
}

ResponseFunc 单个查询接口

Jump to

Keyboard shortcuts

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