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

Method QueryContext

ent/tx.go:273–281  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

271// QueryContext allows calling the underlying QueryContext method of the transaction if it is supported by it.
272// See, database/sql#Tx.QueryContext for more information.
273func (tx *txDriver) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error) {
274 q, ok := tx.tx.(interface {
275 QueryContext(context.Context, string, ...any) (*stdsql.Rows, error)
276 })
277 if !ok {
278 return nil, fmt.Errorf("Tx.QueryContext is not supported")
279 }
280 return q.QueryContext(ctx, query, args...)
281}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected