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

Method QueryEntities

ent/storagepolicy_query.go:114–133  ·  view source on GitHub ↗

QueryEntities chains the current query on the "entities" edge.

()

Source from the content-addressed store, hash-verified

112
113// QueryEntities chains the current query on the "entities" edge.
114func (spq *StoragePolicyQuery) QueryEntities() *EntityQuery {
115 query := (&EntityClient{config: spq.config}).Query()
116 query.path = func(ctx context.Context) (fromU *sql.Selector, err error) {
117 if err := spq.prepareQuery(ctx); err != nil {
118 return nil, err
119 }
120 selector := spq.sqlQuery(ctx)
121 if err := selector.Err(); err != nil {
122 return nil, err
123 }
124 step := sqlgraph.NewStep(
125 sqlgraph.From(storagepolicy.Table, storagepolicy.FieldID, selector),
126 sqlgraph.To(entity.Table, entity.FieldID),
127 sqlgraph.Edge(sqlgraph.O2M, false, storagepolicy.EntitiesTable, storagepolicy.EntitiesColumn),
128 )
129 fromU = sqlgraph.SetNeighbors(spq.driver.Dialect(), step)
130 return fromU, nil
131 }
132 return query
133}
134
135// QueryNode chains the current query on the "node" edge.
136func (spq *StoragePolicyQuery) QueryNode() *NodeQuery {

Callers

nothing calls this directly

Calls 5

prepareQueryMethod · 0.95
sqlQueryMethod · 0.95
DialectMethod · 0.80
ToMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected