QueryEntities chains the current query on the "entities" edge.
()
| 232 | |
| 233 | // QueryEntities chains the current query on the "entities" edge. |
| 234 | func (uq *UserQuery) QueryEntities() *EntityQuery { |
| 235 | query := (&EntityClient{config: uq.config}).Query() |
| 236 | query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { |
| 237 | if err := uq.prepareQuery(ctx); err != nil { |
| 238 | return nil, err |
| 239 | } |
| 240 | selector := uq.sqlQuery(ctx) |
| 241 | if err := selector.Err(); err != nil { |
| 242 | return nil, err |
| 243 | } |
| 244 | step := sqlgraph.NewStep( |
| 245 | sqlgraph.From(user.Table, user.FieldID, selector), |
| 246 | sqlgraph.To(entity.Table, entity.FieldID), |
| 247 | sqlgraph.Edge(sqlgraph.O2M, false, user.EntitiesTable, user.EntitiesColumn), |
| 248 | ) |
| 249 | fromU = sqlgraph.SetNeighbors(uq.driver.Dialect(), step) |
| 250 | return fromU, nil |
| 251 | } |
| 252 | return query |
| 253 | } |
| 254 | |
| 255 | // QueryOauthGrants chains the current query on the "oauth_grants" edge. |
| 256 | func (uq *UserQuery) QueryOauthGrants() *OAuthGrantQuery { |
nothing calls this directly
no test coverage detected