MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / Exec

Method Exec

inventory/debug/debug.go:30–39  ·  view source on GitHub ↗

Exec logs its params and calls the underlying driver Exec method.

(ctx context.Context, query string, args, v any)

Source from the content-addressed store, hash-verified

28
29// Exec logs its params and calls the underlying driver Exec method.
30func (d *DebugDriver) Exec(ctx context.Context, query string, args, v any) error {
31 start := time.Now()
32 err := d.Driver.Exec(ctx, query, args, v)
33 if skip, ok := ctx.Value(SkipDbLogging{}).(bool); ok && skip {
34 return err
35 }
36
37 d.log(ctx, fmt.Sprintf("driver.Exec: query=%v args=%v time=%v", query, args, time.Since(start)))
38 return err
39}
40
41// ExecContext logs its params and calls the underlying driver ExecContext method if it is supported.
42func (d *DebugDriver) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error) {

Callers

nothing calls this directly

Calls 3

ExecMethod · 0.65
SinceMethod · 0.65
ValueMethod · 0.45

Tested by

no test coverage detected