MCPcopy
hub / github.com/jackc/pgx / QueryTracer

Interface QueryTracer

tracer.go:10–16  ·  tracer.go::QueryTracer

QueryTracer traces Query, QueryRow, and Exec.

Source from the content-addressed store, hash-verified

8
9// QueryTracer traces Query, QueryRow, and Exec.
10type QueryTracer interface {
11 // TraceQueryStart is called at the beginning of Query, QueryRow, and Exec calls. The returned context is used for the
12 // rest of the call and will be passed to TraceQueryEnd.
13 TraceQueryStart(ctx context.Context, conn *Conn, data TraceQueryStartData) context.Context
14
15 TraceQueryEnd(ctx context.Context, conn *Conn, data TraceQueryEndData)
16}
17
18type TraceQueryStartData struct {
19 SQL string

Callers 7

ExecMethod · 0.65
QueryMethod · 0.65
TraceQueryStartMethod · 0.65
ExecMethod · 0.65
QueryMethod · 0.65
CloseMethod · 0.65
TraceQueryEndMethod · 0.65

Implementers 6

testTracertracer_test.go
TraceLogtracelog/tracelog.go
testTracerpgxpool/tracer_test.go
testFullTracermultitracer/tracer_test.go
testCopyTracermultitracer/tracer_test.go
Tracermultitracer/tracer.go

Calls

no outgoing calls

Tested by

no test coverage detected