MCPcopy Create free account
hub / github.com/burningalchemist/sql_exporter / Query

Struct Query

query.go:18–30  ·  view source on GitHub ↗

Query wraps a sql.Stmt and all the metrics populated from it. It helps extract keys and values from result rows.

Source from the content-addressed store, hash-verified

16
17// Query wraps a sql.Stmt and all the metrics populated from it. It helps extract keys and values from result rows.
18type Query struct {
19 config *config.QueryConfig
20 metricFamilies []*MetricFamily
21 // columnTypes maps column names to the column type expected by metrics: key (string) or value (float64).
22 columnTypes columnTypeMap
23 logContext string
24
25 durationDesc MetricDesc
26 rowsDesc MetricDesc
27
28 conn *sql.DB
29 stmt *sql.Stmt
30}
31
32type (
33 columnType int

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected