db

package
v0.0.0-...-b705d59 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(orm *gorm.DB, object interface{}) error

通用创建方法

func DbInit

func DbInit(driver, url string) (*gorm.DB, error)

func Delete

func Delete(orm *gorm.DB, object interface{}, id uint64) error

func DeleteBatchByIds

func DeleteBatchByIds(orm *gorm.DB, object interface{}, ids ...uint64) error

func FindById

func FindById(orm *gorm.DB, id uint, object interface{}) (err error)

func Read

func Read(orm *gorm.DB, object interface{}, id uint) error
func Search(orm *gorm.DB, object interface{}, list interface{}, condition map[string][]interface{}, count *int, limit, offset int, preloads ...string) error

通用查询方法

func Update

func Update(orm *gorm.DB, object interface{}) error

通用更新方法

Types

This section is empty.

Jump to

Keyboard shortcuts

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