db

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	*gorm.DB
}

func New

func New() *Instance

func (*Instance) Connect

func (instance *Instance) Connect(dsn string, config *gorm.Config) (err error)

Connect open mysql connection

func (*Instance) EnableConnectionPool

func (instance *Instance) EnableConnectionPool(maxIdleConns int, maxOpenConns int, connMaxLifetime time.Duration) error

EnableConnectionPool enables connection pool

func (*Instance) RegisterResolverConfig

func (instance *Instance) RegisterResolverConfig(config dbresolver.Config, tables ...interface{}) error

RegisterResolverConfig registers resolver configuration for current connection

Jump to

Keyboard shortcuts

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