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

Method QueryUser

ent/client.go:1961–1974  ·  view source on GitHub ↗

QueryUser queries the user edge of a OAuthGrant.

(og *OAuthGrant)

Source from the content-addressed store, hash-verified

1959
1960// QueryUser queries the user edge of a OAuthGrant.
1961func (c *OAuthGrantClient) QueryUser(og *OAuthGrant) *UserQuery {
1962 query := (&UserClient{config: c.config}).Query()
1963 query.path = func(context.Context) (fromV *sql.Selector, _ error) {
1964 id := og.ID
1965 step := sqlgraph.NewStep(
1966 sqlgraph.From(oauthgrant.Table, oauthgrant.FieldID, id),
1967 sqlgraph.To(user.Table, user.FieldID),
1968 sqlgraph.Edge(sqlgraph.M2O, true, oauthgrant.UserTable, oauthgrant.UserColumn),
1969 )
1970 fromV = sqlgraph.Neighbors(og.driver.Dialect(), step)
1971 return fromV, nil
1972 }
1973 return query
1974}
1975
1976// QueryClient queries the client edge of a OAuthGrant.
1977func (c *OAuthGrantClient) QueryClient(og *OAuthGrant) *OAuthClientQuery {

Callers

nothing calls this directly

Calls 3

DialectMethod · 0.80
ToMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected