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

Method Query

ent/intercept/intercept.go:441–446  ·  view source on GitHub ↗

Query calls f(ctx, q).

(ctx context.Context, q ent.Query)

Source from the content-addressed store, hash-verified

439
440// Query calls f(ctx, q).
441func (f StoragePolicyFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error) {
442 if q, ok := q.(*ent.StoragePolicyQuery); ok {
443 return f(ctx, q)
444 }
445 return nil, fmt.Errorf("unexpected query type %T. expect *ent.StoragePolicyQuery", q)
446}
447
448// The TraverseStoragePolicy type is an adapter to allow the use of ordinary function as Traverser.
449type TraverseStoragePolicy func(context.Context, *ent.StoragePolicyQuery) error

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected