dbmgr

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 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 DB

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

func (*DB) Close

func (d *DB) Close() error

func (*DB) Open

func (d *DB) Open(withPing bool, maxOpenConns, maxIdleConns int, maxLifetime, maxIdleTime time.Duration) (*sql.DB, error)

type DBMgr

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

func GetDBMgr

func GetDBMgr() *DBMgr

func (*DBMgr) Add

func (dm *DBMgr) Add(name, driver, dsn string) (*DB, error)

func (*DBMgr) Del

func (dm *DBMgr) Del(name string)

func (*DBMgr) GetConn

func (dm *DBMgr) GetConn(name string) (*sql.DB, error)

func (*DBMgr) GetConns added in v0.2.7

func (dm *DBMgr) GetConns() []string

func (*DBMgr) GetDB

func (dm *DBMgr) GetDB(name string) (*DB, error)

Jump to

Keyboard shortcuts

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