mysql

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option struct {
	Hosts       []string
	Port        int
	Username    string
	Password    string
	DataBase    string
	MaxIdleConn int
	MaxOpenConn int
	LogMode     string
	Config      string
}

func NewOption

func NewOption(hosts []string, port int, username, password, database string) *Option

func (*Option) Connect

func (m *Option) Connect() *gorm.DB

func (*Option) Dsn

func (m *Option) Dsn() string

func (*Option) WithConfig

func (m *Option) WithConfig(config string) *Option

func (*Option) WithLogMode

func (m *Option) WithLogMode(mode string) *Option

func (*Option) WithMaxIdleConn

func (m *Option) WithMaxIdleConn(c int) *Option

func (*Option) WithMaxOpenConn

func (m *Option) WithMaxOpenConn(c int) *Option

Jump to

Keyboard shortcuts

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