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

Method Query

inventory/debug/debug.go:57–65  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

55
56// Query logs its params and calls the underlying driver Query method.
57func (d *DebugDriver) Query(ctx context.Context, query string, args, v any) error {
58 start := time.Now()
59 err := d.Driver.Query(ctx, query, args, v)
60 if skip, ok := ctx.Value(SkipDbLogging{}).(bool); ok && skip {
61 return err
62 }
63 d.log(ctx, fmt.Sprintf("driver.Query: query=%v args=%v time=%v", query, args, time.Since(start)))
64 return err
65}
66
67// QueryContext logs its params and calls the underlying driver QueryContext method if it is supported.
68func (d *DebugDriver) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error) {

Callers

nothing calls this directly

Calls 3

SinceMethod · 0.65
QueryMethod · 0.45
ValueMethod · 0.45

Tested by

no test coverage detected