isudb

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBMetricsSetup

func DBMetricsSetup[T DB](fn func(string, string) (T, error)) func(string, string) (T, error)

func Register added in v2.2.0

func Register(mux *http.ServeMux)

func SetFixInterpolateParams

func SetFixInterpolateParams(enable bool)

func SetQueryTrace

func SetQueryTrace(enable bool)

func SetRetry

func SetRetry(enable bool)

Types

type DB added in v2.2.0

type DB = 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
}

type ExplainResult added in v2.2.0

type ExplainResult struct {
	Table        string   `json:"table"`
	PossibleKeys []string `json:"possible_keys"`
	Key          string   `json:"key"`
	Rows         int      `json:"rows"`
	Filtered     int      `json:"filtered"`
}

Directories

Path Synopsis
internal
generate
Code generated by iwrapper; DO NOT EDIT.
Code generated by iwrapper; DO NOT EDIT.

Jump to

Keyboard shortcuts

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