QueryUser queries the user edge of a OAuthGrant.
(og *OAuthGrant)
| 1959 | |
| 1960 | // QueryUser queries the user edge of a OAuthGrant. |
| 1961 | func (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. |
| 1977 | func (c *OAuthGrantClient) QueryClient(og *OAuthGrant) *OAuthClientQuery { |