Query calls f(ctx, q).
(ctx context.Context, q ent.Query)
| 250 | |
| 251 | // Query calls f(ctx, q). |
| 252 | func (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. |
| 260 | type TraverseMetadata func(context.Context, *ent.MetadataQuery) error |
nothing calls this directly
no outgoing calls
no test coverage detected