mysql

package
v1.1.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func New

func New(ctx context.Context, host, user, passwd, db string) (*DB, error)

func (*DB) EnableFingerprint

func (t *DB) EnableFingerprint()

func (*DB) Escape

func (t *DB) Escape(str string) string

func (*DB) Query

func (t *DB) Query(sql string, params ...interface{}) (rows []mysql.Row, res mysql.Result, err error)

func (*DB) QueryCtx

func (t *DB) QueryCtx(ctx context.Context, sql string, params ...interface{}) (rows []mysql.Row, res mysql.Result, err error)

func (*DB) QueryFirst

func (t *DB) QueryFirst(sql string, params ...interface{}) (row mysql.Row, res mysql.Result, err error)

func (*DB) QueryFirstCtx

func (t *DB) QueryFirstCtx(ctx context.Context, sql string, params ...interface{}) (row mysql.Row, res mysql.Result, err error)

func (*DB) Quote

func (t *DB) Quote(str string) string

Jump to

Keyboard shortcuts

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