imysql

package module
v0.0.0-...-92c526b Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Service)

func WithCharset

func WithCharset(charset string) Option

func WithConnection

func WithConnection(host string, port int, username, password, db string) Option

func WithDebug

func WithDebug(debug bool) Option

func WithLimit

func WithLimit(maxIdle, maxOpen int) Option

func WithPrefix

func WithPrefix(prefix string) Option

type Service

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

func New

func New(opts ...Option) *Service

func (*Service) Close

func (m *Service) Close()

func (*Service) Handle

func (m *Service) Handle() *gorm.DB

func (*Service) Run

func (s *Service) Run() error

MysqlInit 初始化

Jump to

Keyboard shortcuts

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