mysql

package
v1.2.13 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DriverName = "mysql"

Variables

This section is empty.

Functions

func NewMysqlDb

func NewMysqlDb(config Config, models ...any) (db database.Database, err error)

Types

type Config

type Config struct {
	Server        string `yaml:"server,omitempty" json:"server,omitempty" xml:"server,omitempty"`
	Port          int    `yaml:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"`
	Username      string `yaml:"username,omitempty" json:"username,omitempty" xml:"username,omitempty"`
	Password      string `yaml:"password,omitempty" json:"password,omitempty" xml:"password,omitempty"`
	Database      string `yaml:"database,omitempty" json:"database,omitempty" xml:"database,omitempty"`
	Charset       string `yaml:"charset,omitempty" json:"charset,omitempty" xml:"charset,omitempty"`
	Location      string `yaml:"location,omitempty" json:"location,omitempty" xml:"location,omitempty"`
	ParseTime     bool   `yaml:"parse_time,omitempty" json:"parse_time,omitempty" xml:"parse_time,omitempty"`
	Debug         bool   `yaml:"debug,omitempty" json:"debug,omitempty" xml:"debug,omitempty"`
	Stdout        string `yaml:"stdout,omitempty" json:"stdout,omitempty" xml:"stdout,omitempty"`
	Stderr        string `yaml:"stderr,omitempty" json:"stderr,omitempty" xml:"stderr,omitempty"`
	MaxIdle       int    `yaml:"max_idle,omitempty" json:"max_idle,omitempty" xml:"max_idle,omitempty"`
	MaxOpen       int    `yaml:"max_open,omitempty" json:"max_open,omitempty" xml:"max_open,omitempty"`
	MaxLifeSecond int    `yaml:"max_life_second,omitempty" json:"max_life_second,omitempty" xml:"max_life_second,omitempty"`
	TimeoutSecond int    `yaml:"timeout_second,omitempty" json:"timeout_second,omitempty" xml:"timeout_second,omitempty"`
}

Jump to

Keyboard shortcuts

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