model

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(db orm.DB, v interface{}) (int, error)

func Delete

func Delete(db orm.DB, v interface{}) (int, error)

func Find

func Find(db orm.DB, filter Conditions, v interface{}) error

func FindOne

func FindOne(db orm.DB, filter Conditions, v interface{}) error

func FindOneByID

func FindOneByID(db orm.DB, id int64, v interface{}) error

func FindOneForUpdate

func FindOneForUpdate(db orm.DB, filter Conditions, v interface{}) error

func Update

func Update(db orm.DB, v interface{}, column ...string) (int, error)

Types

type Conditions

type Conditions map[string]interface{}

type Timestamps

type Timestamps struct {
	CreatedAt time.Time
	UpdatedAt time.Time
}

Jump to

Keyboard shortcuts

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