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

Method QueryContext

ent/client.go:3129–3137  ·  view source on GitHub ↗

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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

Source from the content-addressed store, hash-verified

3127// QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it.
3128// See, database/sql#DB.QueryContext for more information.
3129func (c *config) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error) {
3130 q, ok := c.driver.(interface {
3131 QueryContext(context.Context, string, ...any) (*stdsql.Rows, error)
3132 })
3133 if !ok {
3134 return nil, fmt.Errorf("Driver.QueryContext is not supported")
3135 }
3136 return q.QueryContext(ctx, query, args...)
3137}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected