mysql

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

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cli

type Cli struct {
	*gorm.DB
}

func Connect

func Connect(dsn string, options ...Option) (*Cli, error)

type LogLevel

type LogLevel int

LogLevel log level

const (
	// Silent silent log level
	Silent LogLevel = iota + 1
	// Error error log level
	Error
	// Warn warn log level
	Warn
	// Info info log level
	Info
)

type Option

type Option func(*option)

func WithLogLevel

func WithLogLevel(lv LogLevel) Option

func WithMaxIdleConns

func WithMaxIdleConns(num int) Option

The default max idle connections is currently 2.

func WithMaxOpenConns

func WithMaxOpenConns(num int) Option

Jump to

Keyboard shortcuts

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