sql

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMysqlConn

func NewMysqlConn(config Config, opts ...Option) (*sql.DB, error)

Types

type Config

type Config struct {
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	User     string `yaml:"user"`
	Pass     string `yaml:"pass"`
	Database string `yaml:"database"`
}

type Option

type Option func(*sql.DB)

func WithMaxConn

func WithMaxConn(n int) Option

func WithMaxIdle

func WithMaxIdle(n int) Option

Jump to

Keyboard shortcuts

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