orm

package
v0.0.0-...-b5ec117 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ORM

type ORM struct {
	*gorm.DB
}

ORM is a wrapper of gorm.io/gorm with additional Create, Find, Update, Delete methods.

func New

func New(c *config.Config) *ORM

func (*ORM) Create

func (orm *ORM) Create(value interface{}) error

func (*ORM) Delete

func (orm *ORM) Delete(i interface{}, ID int) *gorm.DB

func (*ORM) Find

func (orm *ORM) Find(ID int, i interface{}) error

func (*ORM) Update

func (orm *ORM) Update(i interface{}) error

Jump to

Keyboard shortcuts

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