mysql

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 10 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{}
	MTag() string
	Set(conf map[string]interface{}) Dao
	Filter(filter map[string]interface{}) Dao
	OrderBy(orderBy []string) Dao
	Limit(pageSize, pageNum int64) Dao
	Create() error
	Remove(condition map[string]interface{}) (num int64, err error)
	Update(primaryKeys []string, updateFields []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 int64) Dao

func (Impl) MTag added in v1.0.0

func (i Impl) MTag() string

func (Impl) Model

func (i Impl) Model() interface{}

func (Impl) OrderBy

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

func (Impl) Remove added in v1.0.3

func (i Impl) Remove(condition map[string]interface{}) (num int64, err error)

func (Impl) Set added in v1.0.0

func (i Impl) Set(conf map[string]interface{}) 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