Documentation ¶
Index ¶
- func DBMetricsSetup[T interface{ ... }](fn func(string, string) (T, error)) func(string, string) (T, error)
- func Normalize(queries []string) []string
- func SetFixInterpolateParams(enable bool)
- func SetMyProfiler(enable bool)
- func SetMyProfilerInterval(interval time.Duration)
- func SetRetry(enable bool)
- type Queryer
- type RegexpNormalizer
- type RegexpPair
- type Trimer
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 SetFixInterpolateParams ¶
func SetFixInterpolateParams(enable bool)
func SetMyProfiler ¶ added in v1.2.0
func SetMyProfiler(enable bool)
func SetMyProfilerInterval ¶ added in v1.2.0
Types ¶
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
}
Click to show internal directories.
Click to hide internal directories.