Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QueryCustomMetrics ¶
func QueryCustomMetrics(ctx context.Context, db RowQuerier, sqlQuery string, args ...any) ([]*scrapper.CustomMetricsRow, error)
func QueryShape ¶ added in v0.8.3
func QueryShape(ctx context.Context, db RowQuerier, sql string) ([]*scrapper.QueryShapeColumn, error)
Types ¶
type RawDB ¶ added in v0.11.0
RawDB wraps a *sqlx.DB to satisfy RowQuerier without any enrichment. Use this only in tests; production code should pass an executor.
type RowQuerier ¶ added in v0.11.0
type RowQuerier interface {
QueryRows(ctx context.Context, q string, args ...interface{}) (*sqlx.Rows, error)
}
RowQuerier is the minimal interface for executing queries that return rows. It is satisfied by all StdSqlExecutor implementations (which add SQL comment enrichment, query tagging, and stats collection) and by RawDB for tests.
Click to show internal directories.
Click to hide internal directories.