mysql

package
v0.0.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

type Dao interface {
	Model() interface{}
	Filter(map[string]interface{}) Dao
	OrderBy([]string) Dao
	Limit(int, int) Dao
	Create() error
	Update([]string, []string) error
	CreateOrUpdate(primaryKeys []string, updateFields []string) (err error)
	Count() (int64, error)
	Get() (interface{}, error)
	All() ([]interface{}, error)
}

func New

func New(m interface{}) Dao

type Impl

type Impl struct {
	// contains filtered or unexported fields
}

func (Impl) All

func (i Impl) All() (data []interface{}, err error)

func (Impl) Count

func (i Impl) Count() (num int64, err error)

func (Impl) Create

func (i Impl) Create() (err error)

func (Impl) CreateOrUpdate

func (i Impl) CreateOrUpdate(primaryKeys []string, updateFields []string) (err error)

func (Impl) Filter

func (i Impl) Filter(filter map[string]interface{}) Dao

func (Impl) Get

func (i Impl) Get() (data interface{}, err error)

func (Impl) Limit

func (i Impl) Limit(pageSize, pageNum int) Dao

func (Impl) Model

func (i Impl) Model() interface{}

func (Impl) OrderBy

func (i Impl) OrderBy(orderBy []string) Dao

func (Impl) TableName

func (i Impl) TableName() string

func (Impl) Update

func (i Impl) Update(primaryKeys []string, updateFields []string) (err error)

Jump to

Keyboard shortcuts

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