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

Method StmtExecContext

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

Source from the content-addressed store, hash-verified

49}
50
51func (in *traceInterceptor) StmtExecContext(ctx context.Context, stmt driver.StmtExecContext, query string, args []driver.NamedValue) (driver.Result, error) {
52 startedAt := time.Now()
53 result, err := stmt.ExecContext(ctx, args)
54
55 trackGoID(query)
56
57 logrus.WithField("duration", time.Since(startedAt)).WithField(logrus.ErrorKey, err).Debug("executed sql query ", query, " args: ", args)
58
59 return result, err
60}
61
62func (in *traceInterceptor) RowsNext(c context.Context, rows driver.Rows, dest []driver.Value) error {
63 err := rows.Next(dest)

Callers

nothing calls this directly

Calls 1

trackGoIDFunction · 0.85

Tested by

no test coverage detected