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

Method QueryUser

ent/client.go:761–774  ·  view source on GitHub ↗

QueryUser queries the user edge of a Entity.

(e *Entity)

Source from the content-addressed store, hash-verified

759
760// QueryUser queries the user edge of a Entity.
761func (c *EntityClient) QueryUser(e *Entity) *UserQuery {
762 query := (&UserClient{config: c.config}).Query()
763 query.path = func(context.Context) (fromV *sql.Selector, _ error) {
764 id := e.ID
765 step := sqlgraph.NewStep(
766 sqlgraph.From(entity.Table, entity.FieldID, id),
767 sqlgraph.To(user.Table, user.FieldID),
768 sqlgraph.Edge(sqlgraph.M2O, true, entity.UserTable, entity.UserColumn),
769 )
770 fromV = sqlgraph.Neighbors(e.driver.Dialect(), step)
771 return fromV, nil
772 }
773 return query
774}
775
776// QueryStoragePolicy queries the storage_policy edge of a Entity.
777func (c *EntityClient) QueryStoragePolicy(e *Entity) *StoragePolicyQuery {

Callers

nothing calls this directly

Calls 3

DialectMethod · 0.80
ToMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected