dao

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDB

func NewDB(conf *viper.Viper) *gorm.DB

func NewRedis

func NewRedis(conf *viper.Viper) *redis.Client

Types

type Dao

type Dao struct {
	Db  *gorm.DB
	Rdb *redis.Client
}

type UserDao

type UserDao struct {
	*Dao
}

func NewUserDao

func NewUserDao(dao *Dao) *UserDao

func (*UserDao) GetData

func (u *UserDao) GetData(query any, arg ...any) []*model.DemoUser

func (*UserDao) Insert

func (u *UserDao) Insert(data *model.DemoUser) error

type WorkDataResultDao

type WorkDataResultDao struct {
	*Dao
}

func NewWorkDataResultDao

func NewWorkDataResultDao(dao *Dao) *WorkDataResultDao

func (*WorkDataResultDao) Delete

func (w *WorkDataResultDao) Delete(dbobj *gorm.DB, query any, arg ...any)

func (*WorkDataResultDao) GetData

func (w *WorkDataResultDao) GetData() []model.Dataresult

func (*WorkDataResultDao) GetDataByWhere

func (w *WorkDataResultDao) GetDataByWhere(pkid, result_id string) []model.Dataresult

func (*WorkDataResultDao) Insert

func (w *WorkDataResultDao) Insert(dbobj *gorm.DB, data []*model.Dataresult) error

type WorkDatasV3Dao

type WorkDatasV3Dao struct {
	*Dao
}

func NewWorkDatasV3Dao

func NewWorkDatasV3Dao(dao *Dao) *WorkDatasV3Dao

func (*WorkDatasV3Dao) Delete

func (w *WorkDatasV3Dao) Delete(dbobj *gorm.DB, query any, arg ...any)

func (*WorkDatasV3Dao) GetCount

func (w *WorkDatasV3Dao) GetCount(data *model.DatasV3) int64

func (*WorkDatasV3Dao) GetData

func (w *WorkDatasV3Dao) GetData() []*model.DatasV3

func (*WorkDatasV3Dao) GetDataByWhere

func (w *WorkDatasV3Dao) GetDataByWhere(data *model.DatasV3, offset, limit int) []*model.DatasV3

func (*WorkDatasV3Dao) Insert

func (w *WorkDatasV3Dao) Insert(dbobj *gorm.DB, data []*model.DatasV3) error

type WorkLogDao

type WorkLogDao struct {
	*Dao
}

func NewWorkLogDao

func NewWorkLogDao(dao *Dao) *WorkLogDao

func (*WorkLogDao) Count

func (w *WorkLogDao) Count() int64

func (*WorkLogDao) Delete

func (w *WorkLogDao) Delete(query any, args ...any) error

func (*WorkLogDao) GetData

func (w *WorkLogDao) GetData(offset, limit int) []*model.DemoLog

func (*WorkLogDao) Insert

func (w *WorkLogDao) Insert(data []*model.DemoLog) error

type WorkParamsDao

type WorkParamsDao struct {
	*Dao
}

func NewWorkParamsDao

func NewWorkParamsDao(dao *Dao) *WorkParamsDao

func (*WorkParamsDao) GetData

func (w *WorkParamsDao) GetData() []*model.DemoParams

func (*WorkParamsDao) Update

func (w *WorkParamsDao) Update(data url.Values) error

type WorkRecordV3Dao

type WorkRecordV3Dao struct {
	*Dao
}

func NewWorkRecordV3Dao

func NewWorkRecordV3Dao(dao *Dao) *WorkRecordV3Dao

func (*WorkRecordV3Dao) Delete

func (w *WorkRecordV3Dao) Delete(dbobj *gorm.DB, query any, arg ...any)

func (*WorkRecordV3Dao) GetDataByWhere

func (w *WorkRecordV3Dao) GetDataByWhere(col string, query any, arg ...any) []*model.RecordV3

func (*WorkRecordV3Dao) Insert

func (w *WorkRecordV3Dao) Insert(dbobj *gorm.DB, wdata []*model.RecordV3) error

type WorkResultDao

type WorkResultDao struct {
	*Dao
}

func NewWorkResultDao

func NewWorkResultDao(dao *Dao) *WorkResultDao

func (*WorkResultDao) Delete

func (w *WorkResultDao) Delete(data *model.DemoResult) error

func (*WorkResultDao) GetData

func (w *WorkResultDao) GetData() []*model.DemoResult

func (*WorkResultDao) Insert

func (w *WorkResultDao) Insert(data []*model.DemoResult) error

func (*WorkResultDao) Update

func (w *WorkResultDao) Update(data *model.DemoResult) error

Jump to

Keyboard shortcuts

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