MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / QueryGroups

Method QueryGroups

ent/client.go:2581–2594  ·  view source on GitHub ↗

QueryGroups queries the groups edge of a StoragePolicy.

(sp *StoragePolicy)

Source from the content-addressed store, hash-verified

2579
2580// QueryGroups queries the groups edge of a StoragePolicy.
2581func (c *StoragePolicyClient) QueryGroups(sp *StoragePolicy) *GroupQuery {
2582 query := (&GroupClient{config: c.config}).Query()
2583 query.path = func(context.Context) (fromV *sql.Selector, _ error) {
2584 id := sp.ID
2585 step := sqlgraph.NewStep(
2586 sqlgraph.From(storagepolicy.Table, storagepolicy.FieldID, id),
2587 sqlgraph.To(group.Table, group.FieldID),
2588 sqlgraph.Edge(sqlgraph.O2M, false, storagepolicy.GroupsTable, storagepolicy.GroupsColumn),
2589 )
2590 fromV = sqlgraph.Neighbors(sp.driver.Dialect(), step)
2591 return fromV, nil
2592 }
2593 return query
2594}
2595
2596// QueryFiles queries the files edge of a StoragePolicy.
2597func (c *StoragePolicyClient) QueryFiles(sp *StoragePolicy) *FileQuery {

Callers

nothing calls this directly

Calls 3

DialectMethod · 0.80
ToMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected