mysql

package
v0.0.0-...-eaabf50 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func InitMysqlCfg

func InitMysqlCfg() (err error)

InitMysqlCfg init mysql db

func InsertOne

func InsertOne(reqData *models.ParamAddUser) (err error)

func SearchAll

func SearchAll() (interface{}, error)

func SearchAllWithPost

func SearchAllWithPost(reqData *models.ParamPage) (interface{}, error)

func SearchOne

func SearchOne() (int, error)

func UpdateName

func UpdateName(reqData *models.ParamUpdateName) (err error)

Types

type SqlUtil

type SqlUtil struct{}

func (*SqlUtil) Exec

func (s *SqlUtil) Exec(db *sqlx.DB, sql string, args ...interface{}) (res sql.Result, err error)

func (*SqlUtil) FetchAll

func (s *SqlUtil) FetchAll(db *sqlx.DB, sql string, dest interface{}, args ...interface{}) error

func (*SqlUtil) FetchOne

func (s *SqlUtil) FetchOne(db *sqlx.DB, sql string, dest interface{}, args ...interface{}) error

func (*SqlUtil) NewSession

func (s *SqlUtil) NewSession() *sqlx.Tx

Jump to

Keyboard shortcuts

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