MCPcopy Index your code
hub / github.com/cloudreve/cloudreve / withTaskEagerLoading

Function withTaskEagerLoading

inventory/task.go:332–340  ·  view source on GitHub ↗
(ctx context.Context, q *ent.TaskQuery)

Source from the content-addressed store, hash-verified

330}
331
332func withTaskEagerLoading(ctx context.Context, q *ent.TaskQuery) *ent.TaskQuery {
333 if v, ok := ctx.Value(LoadTaskUser{}).(bool); ok && v {
334 q.WithUser(func(q *ent.UserQuery) {
335 withUserEagerLoading(ctx, q)
336 })
337 }
338
339 return q
340}

Callers 3

GetPendingTasksMethod · 0.85
GetTaskByIDMethod · 0.85
ListMethod · 0.85

Calls 3

withUserEagerLoadingFunction · 0.85
ValueMethod · 0.45
WithUserMethod · 0.45

Tested by

no test coverage detected