sqlpool

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: Apache-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 Pool

type Pool interface {
	AddSQL(key, sqlStr string)
	AddStmtCachedSQL(key, sqlStr string)
	GetSQL(key string) string
	Exec(key string) (sql.Result, error)
	Query(args ...interface{}) (*sql.Rows, error)
	QueryRow(args ...interface{}) *sql.Row
}

Pool sql语句池

func NewDefaultPool

func NewDefaultPool() Pool

NewDefaultPool 初始化一个默认sqlpool

type PoolProvider

type PoolProvider interface {
	NewPool(name string) Pool
	GetPoolStati(name string) PoolStati
}

PoolProvider pool manager

type PoolStati

type PoolStati interface {
	ALLSQL() []string
	CallCount() map[string]int64
}

PoolStati sqlpool 统计信息

Jump to

Keyboard shortcuts

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