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

Method Query

ent/intercept/intercept.go:252–257  ·  view source on GitHub ↗

Query calls f(ctx, q).

(ctx context.Context, q ent.Query)

Source from the content-addressed store, hash-verified

250
251// Query calls f(ctx, q).
252func (f MetadataFunc) Query(ctx context.Context, q ent.Query) (ent.Value, error) {
253 if q, ok := q.(*ent.MetadataQuery); ok {
254 return f(ctx, q)
255 }
256 return nil, fmt.Errorf("unexpected query type %T. expect *ent.MetadataQuery", q)
257}
258
259// The TraverseMetadata type is an adapter to allow the use of ordinary function as Traverser.
260type TraverseMetadata func(context.Context, *ent.MetadataQuery) error

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected