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

Method QueryEntities

ent/client.go:2613–2626  ·  view source on GitHub ↗

QueryEntities queries the entities edge of a StoragePolicy.

(sp *StoragePolicy)

Source from the content-addressed store, hash-verified

2611
2612// QueryEntities queries the entities edge of a StoragePolicy.
2613func (c *StoragePolicyClient) QueryEntities(sp *StoragePolicy) *EntityQuery {
2614 query := (&EntityClient{config: c.config}).Query()
2615 query.path = func(context.Context) (fromV *sql.Selector, _ error) {
2616 id := sp.ID
2617 step := sqlgraph.NewStep(
2618 sqlgraph.From(storagepolicy.Table, storagepolicy.FieldID, id),
2619 sqlgraph.To(entity.Table, entity.FieldID),
2620 sqlgraph.Edge(sqlgraph.O2M, false, storagepolicy.EntitiesTable, storagepolicy.EntitiesColumn),
2621 )
2622 fromV = sqlgraph.Neighbors(sp.driver.Dialect(), step)
2623 return fromV, nil
2624 }
2625 return query
2626}
2627
2628// QueryNode queries the node edge of a StoragePolicy.
2629func (c *StoragePolicyClient) QueryNode(sp *StoragePolicy) *NodeQuery {

Callers

nothing calls this directly

Calls 3

DialectMethod · 0.80
ToMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected