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

Method WithStoragePolicy

ent/node_query.go:286–293  ·  view source on GitHub ↗

WithStoragePolicy tells the query-builder to eager-load the nodes that are connected to the "storage_policy" edge. The optional arguments are used to configure the query builder of the edge.

(opts ...func(*StoragePolicyQuery))

Source from the content-addressed store, hash-verified

284// WithStoragePolicy tells the query-builder to eager-load the nodes that are connected to
285// the "storage_policy" edge. The optional arguments are used to configure the query builder of the edge.
286func (nq *NodeQuery) WithStoragePolicy(opts ...func(*StoragePolicyQuery)) *NodeQuery {
287 query := (&StoragePolicyClient{config: nq.config}).Query()
288 for _, opt := range opts {
289 opt(query)
290 }
291 nq.withStoragePolicy = query
292 return nq
293}
294
295// GroupBy is used to group vertices by one or more fields/columns.
296// It is often used with aggregate functions, like: count, max, mean, min, sum.

Callers 2

withNodeEagerLoadingFunction · 0.45
withEntityEagerLoadingFunction · 0.45

Calls 1

QueryMethod · 0.45

Tested by

no test coverage detected