sql

package
v0.0.0-...-cb6d2b4 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const LogMysql = "LogMysql"

Variables

This section is empty.

Functions

func GetTraceID

func GetTraceID() string

Types

type DB

type DB struct {
	Address string

	DbNameBase string
	// contains filtered or unexported fields
}

func MySQLConnect

func MySQLConnect(address, user, pwd, db_name string) (db *DB, err error)

func MySQLConnectS

func MySQLConnectS(conf MySQLConfig) (db *DB, err error)

func MySQLConnectWithConnNum

func MySQLConnectWithConnNum(address, user, pwd, db_name string, num_conn int) (db *DB, err error)

func NewDB

func NewDB(ori *sql.DB, addr string) *DB

func (*DB) Exec

func (db *DB) Exec(query string, args ...interface{}) (Result, error)

func (*DB) Query

func (db *DB) Query(query string, args ...interface{}) (*Rows, error)

type MySQLConfig

type MySQLConfig struct {
	Address string
	Dbname  string
	User    string
	Pwd     string
}

type Result

type Result struct {
	sql.Result
}

type Rows

type Rows struct {
	*sql.Rows
}

Jump to

Keyboard shortcuts

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