stdsql

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

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

type RawDB struct{ DB *sqlx.DB }

RawDB wraps a *sqlx.DB to satisfy RowQuerier without any enrichment. Use this only in tests; production code should pass an executor.

func (*RawDB) QueryRows added in v0.11.0

func (r *RawDB) QueryRows(ctx context.Context, q string, args ...interface{}) (*sqlx.Rows, error)

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.

Jump to

Keyboard shortcuts

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