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

Method QueryOwner

ent/client.go:443–456  ·  view source on GitHub ↗

QueryOwner queries the owner edge of a DavAccount.

(da *DavAccount)

Source from the content-addressed store, hash-verified

441
442// QueryOwner queries the owner edge of a DavAccount.
443func (c *DavAccountClient) QueryOwner(da *DavAccount) *UserQuery {
444 query := (&UserClient{config: c.config}).Query()
445 query.path = func(context.Context) (fromV *sql.Selector, _ error) {
446 id := da.ID
447 step := sqlgraph.NewStep(
448 sqlgraph.From(davaccount.Table, davaccount.FieldID, id),
449 sqlgraph.To(user.Table, user.FieldID),
450 sqlgraph.Edge(sqlgraph.M2O, true, davaccount.OwnerTable, davaccount.OwnerColumn),
451 )
452 fromV = sqlgraph.Neighbors(da.driver.Dialect(), step)
453 return fromV, nil
454 }
455 return query
456}
457
458// Hooks returns the client hooks.
459func (c *DavAccountClient) Hooks() []Hook {

Callers

nothing calls this directly

Calls 3

DialectMethod · 0.80
ToMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected