mysql

package
v0.0.0-...-7206171 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MulanPSL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDb

func GetDb() string

func Init

func Init(cfg *config.MysqlConfig) bool

func MAdd

func MAdd(dest interface{}) int64

MAdd 插入数据

func MExec

func MExec(sql string, values ...interface{}) int64

MExec 执行SQL

func MFindList

func MFindList(dest interface{}, destList interface{}) int64

MFindList 查找数据列表

func MFindListByIn

func MFindListByIn(sql string, destList interface{}) int64

MFindListByIn 根据in查询查找数据列表

func MFindOne

func MFindOne(dest interface{}) int64

MFindOne 查找一个数据

func MRemove

func MRemove(dest interface{}) int64

MRemove 删除数据

func MSave

func MSave(dest interface{}) int64

MSave 更新数据

Types

type DbDaoMysqlSupport

type DbDaoMysqlSupport struct {
}

func (DbDaoMysqlSupport) CountList

func (db DbDaoMysqlSupport) CountList(query interface{}) uint64

func (DbDaoMysqlSupport) DelData

func (db DbDaoMysqlSupport) DelData(query interface{}) int64

func (DbDaoMysqlSupport) InsertOne

func (db DbDaoMysqlSupport) InsertOne(dest interface{}) int64

func (DbDaoMysqlSupport) SelectOne

func (db DbDaoMysqlSupport) SelectOne(query interface{}) interface{}

func (DbDaoMysqlSupport) SelectSortPageList

func (db DbDaoMysqlSupport) SelectSortPageList(query interface{}, skip, limit int, sort ...string) interface{}

func (DbDaoMysqlSupport) UpdateOne

func (db DbDaoMysqlSupport) UpdateOne(dest interface{}, query interface{}, update interface{}) int64

type MConfig

type MConfig struct {
	MaxIdle   int
	MaxActive int
	Configs   []MServerConfig
}

type MServerConfig

type MServerConfig struct {
	Name     string
	User     string
	Password string
	Url      string
	Db       string
}

type Query

type Query struct {
	Key string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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