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

Method QueryUser

ent/client.go:2128–2141  ·  view source on GitHub ↗

QueryUser queries the user edge of a Passkey.

(pa *Passkey)

Source from the content-addressed store, hash-verified

2126
2127// QueryUser queries the user edge of a Passkey.
2128func (c *PasskeyClient) QueryUser(pa *Passkey) *UserQuery {
2129 query := (&UserClient{config: c.config}).Query()
2130 query.path = func(context.Context) (fromV *sql.Selector, _ error) {
2131 id := pa.ID
2132 step := sqlgraph.NewStep(
2133 sqlgraph.From(passkey.Table, passkey.FieldID, id),
2134 sqlgraph.To(user.Table, user.FieldID),
2135 sqlgraph.Edge(sqlgraph.M2O, true, passkey.UserTable, passkey.UserColumn),
2136 )
2137 fromV = sqlgraph.Neighbors(pa.driver.Dialect(), step)
2138 return fromV, nil
2139 }
2140 return query
2141}
2142
2143// Hooks returns the client hooks.
2144func (c *PasskeyClient) Hooks() []Hook {

Callers

nothing calls this directly

Calls 3

DialectMethod · 0.80
ToMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected