Query wraps a sql.Stmt and all the metrics populated from it. It helps extract keys and values from result rows.
| 16 | |
| 17 | // Query wraps a sql.Stmt and all the metrics populated from it. It helps extract keys and values from result rows. |
| 18 | type 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 | |
| 32 | type ( |
| 33 | columnType int |
nothing calls this directly
no outgoing calls
no test coverage detected