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

Function withNodeEagerLoading

inventory/node.go:148–156  ·  view source on GitHub ↗
(ctx context.Context, query *ent.NodeQuery)

Source from the content-addressed store, hash-verified

146}
147
148func withNodeEagerLoading(ctx context.Context, query *ent.NodeQuery) *ent.NodeQuery {
149 if _, ok := ctx.Value(LoadNodeStoragePolicy{}).(bool); ok {
150 query = query.WithStoragePolicy(func(gq *ent.StoragePolicyQuery) {
151 withStoragePolicyEagerLoading(ctx, gq)
152 })
153 }
154
155 return query
156}

Callers 3

GetNodeByIdsMethod · 0.85
GetNodeByIdMethod · 0.85
ListNodesMethod · 0.85

Calls 3

ValueMethod · 0.45
WithStoragePolicyMethod · 0.45

Tested by

no test coverage detected