db

package
v1.0.37 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseDbProvider

type BaseDbProvider struct {
	Default *sqlx.DB            // 缺省的数据库连接
	Main    *sqlx.DB            // 主数据库连接,可读写
	Slaves  []*sqlx.DB          // 只读从数据库列表,只可读
	Items   map[string]*sqlx.DB // 额外数据库
}

func (*BaseDbProvider) By

func (c *BaseDbProvider) By(name string) *sqlx.DB

func (*BaseDbProvider) Master

func (c *BaseDbProvider) Master() *sqlx.DB

func (*BaseDbProvider) My

func (c *BaseDbProvider) My() *sqlx.DB

func (*BaseDbProvider) Slave

func (c *BaseDbProvider) Slave(index int) *sqlx.DB

Directories

Path Synopsis
Package mysql @Title log capability of zerolog @Description zerolog implementation of log capability @Author Ryan Fan 2021-06-09 @Update Ryan Fan 2021-06-09
Package mysql @Title log capability of zerolog @Description zerolog implementation of log capability @Author Ryan Fan 2021-06-09 @Update Ryan Fan 2021-06-09

Jump to

Keyboard shortcuts

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