Mysql

package
v0.0.0-...-eedd94a Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckErr

func CheckErr(err error)

func Connect

func Connect(conf *MysqlConfig) *sql.DB

func Fetch_map

func Fetch_map(db *sql.DB, sqlStr string, param ...interface{}) map[int]map[string]string

func Fetch_one

func Fetch_one(db *sql.DB, sqlStr string, param ...interface{}) map[string]string

func SQL_insert_error

func SQL_insert_error(db *sql.DB, sqlStr string, param ...interface{}) (int64, error)

func SQL_query_error

func SQL_query_error(db *sql.DB, sqlStr string, param ...interface{}) (int64, error)

func Test

func Test(db *sql.DB, sqlStr string)

Types

type MysqlConfig

type MysqlConfig struct {
	Host     string `127.0.0.1`
	Database string `dbname`
	Username string `root`
	Password string `root`
	Port     int    `3306`
	Charset  string `utf-8`
}

Jump to

Keyboard shortcuts

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