isudb

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBMetricsSetup

func DBMetricsSetup[T interface {
	Ping() error
	Close() error
	Query(query string, args ...any) (*sql.Rows, error)
	SetConnMaxIdleTime(d time.Duration)
	SetConnMaxLifetime(d time.Duration)
	SetMaxIdleConns(n int)
	SetMaxOpenConns(n int)
	Stats() sql.DBStats
}](fn func(string, string) (T, error)) func(string, string) (T, error)

func Normalize added in v1.2.0

func Normalize(queries []string) []string

func SetFixInterpolateParams

func SetFixInterpolateParams(enable bool)

func SetMyProfiler added in v1.2.0

func SetMyProfiler(enable bool)

func SetMyProfilerInterval added in v1.2.0

func SetMyProfilerInterval(interval time.Duration)

func SetRetry

func SetRetry(enable bool)

Types

type Queryer added in v1.2.0

type Queryer interface {
	Query(query string, args ...any) (*sql.Rows, error)
}

type RegexpNormalizer added in v1.2.0

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

func (*RegexpNormalizer) Normalize added in v1.2.0

func (p *RegexpNormalizer) Normalize(q string) string

type RegexpPair added in v1.2.0

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

type Trimer added in v1.2.0

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

func (*Trimer) TrimFunc added in v1.2.0

func (tr *Trimer) TrimFunc(c rune) bool

Jump to

Keyboard shortcuts

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