db

package
v0.0.0-...-6bcf8dd Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	component.DefaultComponent
}

func (*Component) Create

func (dbc *Component) Create(instConfig *component.ComponentInstConfig) (interface{}, error)

func (*Component) Update

func (dbc *Component) Update(inst interface{}, instConfig *component.ComponentInstConfig) error

type DS

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

func NewDB

func NewDB(name string, configor pbconfig.Configor) (*DS, error)

func (*DS) Destroy

func (db *DS) Destroy() error

func (*DS) Ds

func (db *DS) Ds() *sqlx.DB

func (*DS) ParseConfig

func (db *DS) ParseConfig(configor *pbconfig.Configor) DsConf

func (*DS) UpdatePool

func (db *DS) UpdatePool(dsname string, conf DsConf) (*DS, error)

db

type DsConf

type DsConf struct {
	DriverName      string
	DataSourceName  string
	MaxOpenConns    int
	MaxIdleConns    int
	ConnMaxLifetime time.Duration // idletimeout
}

Jump to

Keyboard shortcuts

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