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

Method WithShares

ent/file_query.go:525–532  ·  view source on GitHub ↗

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

(opts ...func(*ShareQuery))

Source from the content-addressed store, hash-verified

523// WithShares tells the query-builder to eager-load the nodes that are connected to
524// the "shares" edge. The optional arguments are used to configure the query builder of the edge.
525func (fq *FileQuery) WithShares(opts ...func(*ShareQuery)) *FileQuery {
526 query := (&ShareClient{config: fq.config}).Query()
527 for _, opt := range opts {
528 opt(query)
529 }
530 fq.withShares = query
531 return fq
532}
533
534// WithDirectLinks tells the query-builder to eager-load the nodes that are connected to
535// the "direct_links" edge. The optional arguments are used to configure the query builder of the edge.

Callers 1

withFileEagerLoadingFunction · 0.45

Calls 1

QueryMethod · 0.45

Tested by

no test coverage detected