database

package module
v0.0.0-...-2862021 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

README

database

all database for go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMySQL

func CreateMySQL(host, port, user, password, dbname, charset string, idle, open int) (*sql.DB, error)

func NewMySQL

func NewMySQL(db MySQL) (*sql.DB, error)

Types

type MySQL

type MySQL struct {
	Host         string `yaml:"host" json:"host" bson:"host"`
	Port         string `yaml:"port" json:"port" bson:"port"`
	User         string `yaml:"user" json:"user" bson:"user"`
	Password     string `yaml:"password" json:"password" bson:"password"`
	DBname       string `yaml:"db" json:"db" bson:"db"`
	Charset      string `yaml:"charset" json:"charset" bson:"charset"`
	MaxIdleConns int    `yaml:"maxidleconns" json:"maxidleconns" bson:"maxidleconns"`
	MaxOpenConns int    `yaml:"maxopenconns" json:"maxopenconns" bson:"maxidleconns"`
}

Jump to

Keyboard shortcuts

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