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

Method QueryClient

ent/client.go:1977–1990  ·  view source on GitHub ↗

QueryClient queries the client edge of a OAuthGrant.

(og *OAuthGrant)

Source from the content-addressed store, hash-verified

1975
1976// QueryClient queries the client edge of a OAuthGrant.
1977func (c *OAuthGrantClient) QueryClient(og *OAuthGrant) *OAuthClientQuery {
1978 query := (&OAuthClientClient{config: c.config}).Query()
1979 query.path = func(context.Context) (fromV *sql.Selector, _ error) {
1980 id := og.ID
1981 step := sqlgraph.NewStep(
1982 sqlgraph.From(oauthgrant.Table, oauthgrant.FieldID, id),
1983 sqlgraph.To(oauthclient.Table, oauthclient.FieldID),
1984 sqlgraph.Edge(sqlgraph.M2O, true, oauthgrant.ClientTable, oauthgrant.ClientColumn),
1985 )
1986 fromV = sqlgraph.Neighbors(og.driver.Dialect(), step)
1987 return fromV, nil
1988 }
1989 return query
1990}
1991
1992// Hooks returns the client hooks.
1993func (c *OAuthGrantClient) Hooks() []Hook {

Callers

nothing calls this directly

Calls 3

DialectMethod · 0.80
ToMethod · 0.65
QueryMethod · 0.45

Tested by

no test coverage detected