MCPcopy Create free account
hub / github.com/daodst/chat / StmtQueryContext

Method StmtQueryContext

internal/sqlutil/trace.go:40–49  ·  view source on GitHub ↗
(ctx context.Context, stmt driver.StmtQueryContext, query string, args []driver.NamedValue)

Source from the content-addressed store, hash-verified

38}
39
40func (in *traceInterceptor) StmtQueryContext(ctx context.Context, stmt driver.StmtQueryContext, query string, args []driver.NamedValue) (context.Context, driver.Rows, error) {
41 startedAt := time.Now()
42 rows, err := stmt.QueryContext(ctx, args)
43
44 trackGoID(query)
45
46 logrus.WithField("duration", time.Since(startedAt)).WithField(logrus.ErrorKey, err).Debug("executed sql query ", query, " args: ", args)
47
48 return ctx, rows, err
49}
50
51func (in *traceInterceptor) StmtExecContext(ctx context.Context, stmt driver.StmtExecContext, query string, args []driver.NamedValue) (driver.Result, error) {
52 startedAt := time.Now()

Callers

nothing calls this directly

Calls 2

trackGoIDFunction · 0.85
QueryContextMethod · 0.80

Tested by

no test coverage detected