model

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Orm   *gorm.DB       `gorm:"-" json:"-"`
	Log   *logger.Helper `gorm:"-" json:"-"`
	Error error          `gorm:"-" json:"-"`
}

func (Model) Add added in v1.3.26

func (e Model) Add(model interface{}) (err error)

func (Model) Del added in v1.3.26

func (e Model) Del(model interface{}, conds string, params ...interface{}) (err error)

func (Model) Delete added in v1.3.26

func (e Model) Delete(model interface{}, condition ...func(db *gorm.DB) *gorm.DB) error

func (Model) DeleteByConds added in v1.3.26

func (e Model) DeleteByConds(model interface{}, params ...interface{}) error

func (Model) FindCount added in v1.3.26

func (e Model) FindCount(model interface{}, count *int64, condition ...func(db *gorm.DB) *gorm.DB) (err error)

func (Model) FindCountByConds added in v1.3.26

func (e Model) FindCountByConds(list interface{}, count *int64, conds string, params ...interface{}) error

func (Model) FindList added in v1.3.26

func (e Model) FindList(list interface{}, condition ...func(db *gorm.DB) *gorm.DB) (err error)

func (Model) FindListByConds added in v1.3.26

func (e Model) FindListByConds(model interface{}, conds string, params ...interface{}) (err error)

func (Model) FindOne added in v1.3.26

func (e Model) FindOne(model interface{}, condition ...func(db *gorm.DB) *gorm.DB) (err error)

func (Model) FindOneByConds added in v1.3.26

func (e Model) FindOneByConds(model interface{}, conds string, params ...interface{}) (err error)

func (Model) FindPage added in v1.3.26

func (e Model) FindPage(list interface{}, count *int64, condition ...func(db *gorm.DB) *gorm.DB) (err error)

func (Model) Mod added in v1.3.26

func (e Model) Mod(model interface{}) (err error)

func (Model) ModByConds added in v1.3.26

func (e Model) ModByConds(model interface{}, conds string, params ...interface{}) (err error)

func (Model) ModMap added in v1.3.26

func (e Model) ModMap(data interface{}, updates map[string]interface{}, condition ...func(db *gorm.DB) *gorm.DB) error

func (Model) Upsert added in v1.3.26

func (e Model) Upsert(data interface{}, conflictColumns ...string) error

func (Model) UpsertDoUpdate added in v1.3.26

func (e Model) UpsertDoUpdate(data interface{}, conflictColumns []string, doUpdates []string) error

Jump to

Keyboard shortcuts

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