generaliface

package
v1.6.111 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2025 License: MulanPSL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DaoIface

type DaoIface[P int32 | int64 | string, E IBaseModel[P]] interface {
	Insert(entity *E) (P, error)
	DeleteById(pkey P) error
	Save(entity *E) (P, error)
	Update(entity *E) (P, error)
	UpdateNotNull(pkey P, maps map[string]any) (P, error)
	UpdateMap(pkey P, maps map[string]interface{}) (P, error)
	FindById(pkey P) (entity *E, found bool, err error)
	FindByIds(pks string) (*[]E, error)
	Query() *page.PageResult
	Count() (int, error)

	GetDB() *gorm.DB
}

type DbcheckIface added in v1.5.10

type DbcheckIface[P dbiface.GoPkey, E IBaseModel[P]] interface {
	CacheListAll() *pagemodel.PageResult[E]
	CacheListKeyOf(v any) *pagemodel.IchubResult[E]
	CacheListAllOf(f string, v any) *pagemodel.IchubResult[E]
	CacheFindId(v any) *pagemodel.IchubResult[E]
	CheckRecord(pkeyValue P, exps string) *baseret.IchubResult
}

type IBaseModel

type IBaseModel[P dbiface.GoPkey] interface {
	PkeyName() string
	PkeyValue() P
	TableName() string
}

type WebIface

type WebIface interface {
	Query(ctx *gin.Context)
	FindById(ctx *gin.Context)
	DeleteById(ctx *gin.Context)
	Save(ctx *gin.Context)
	UpdateNotNull(ctx *gin.Context)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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