mysql

package
v2.0.0-...-172f5c6 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DriverName godbv2.DriverName = "mysql"

Variables

This section is empty.

Functions

This section is empty.

Types

type MYSQL

type MYSQL struct {
	godbv2.Connect
	// contains filtered or unexported fields
}

MYSQL mysql操作对象

func Connect

func Connect(host, username, password, db string, other ...string) (*MYSQL, error)

Connect 链接mysql数据库,其中other参数代表链接字符串附加的配置信息 其中other="loc=Local&multiStatements=true"

func (*MYSQL) Close

func (m *MYSQL) Close()

func (*MYSQL) QueryRow

func (m *MYSQL) QueryRow(sql string, args ...interface{}) *godbv2.QueryResult

func (*MYSQL) QueryWithPage

func (m *MYSQL) QueryWithPage(sql string, page *godbv2.PageObj, args ...interface{}) *godbv2.QueryResult

func (*MYSQL) SetConn

func (m *MYSQL) SetConn(conn godbv2.QueryWithContext)

func (*MYSQL) Transaction

func (m *MYSQL) Transaction(t godbv2.TransactionFunc, option ...*sql.TxOptions) error

Jump to

Keyboard shortcuts

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