mysql

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: BSD-2-Clause Imports: 1 Imported by: 0

README

dsn := &mysql.DSN{ Host: "127.0.0.1", Port: 3306, User: "root", } db, err := mysql.Dial(dsn, time.Second) if err != nil { panic(err) } defer db.Close()

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DSN

type DSN struct {
	Host string // 1.2.3.4
	Port string // 3306
	User string // foo
	Pass string // 123456
	Name string // dbname
	Code string // utf8mb4
}

type MySQL

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

func Dial

func Dial(dsn *DSN, timeout time.Duration) (*MySQL, error)

func (*MySQL) Close

func (c *MySQL) Close() error

type Result

type Result struct {
}

Jump to

Keyboard shortcuts

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