QueryTracer traces Query, QueryRow, and Exec.
| 8 | |
| 9 | // QueryTracer traces Query, QueryRow, and Exec. |
| 10 | type 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 | |
| 18 | type TraceQueryStartData struct { |
| 19 | SQL string |
no outgoing calls
no test coverage detected