mysql

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Table string
	DB    func() *gorm.DB
}

func (*Model) Count

func (m *Model) Count(where []interface{}) (count int64)

func (*Model) Delete

func (m *Model) Delete(where []interface{}) error

func (*Model) Find

func (m *Model) Find(dest interface{}, where []interface{}, fields, order string, offset, limit int)

func (*Model) FindOne

func (m *Model) FindOne(dest interface{}, where []interface{}, fields, order string)

func (*Model) NewMysql

func (m *Model) NewMysql(dbc *types.DBCollector, dialect *types.MysqlDialect) (*gorm.DB, error)

func (*Model) Save

func (m *Model) Save(value interface{}, id ...int) (interface{}, error)

func (*Model) Update

func (m *Model) Update(where []interface{}, value interface{}) error

Jump to

Keyboard shortcuts

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