QueryOwner queries the owner edge of a Alert.
(_m *Alert)
| 397 | |
| 398 | // QueryOwner queries the owner edge of a Alert. |
| 399 | func (c *AlertClient) QueryOwner(_m *Alert) *MachineQuery { |
| 400 | query := (&MachineClient{config: c.config}).Query() |
| 401 | query.path = func(context.Context) (fromV *sql.Selector, _ error) { |
| 402 | id := _m.ID |
| 403 | step := sqlgraph.NewStep( |
| 404 | sqlgraph.From(alert.Table, alert.FieldID, id), |
| 405 | sqlgraph.To(machine.Table, machine.FieldID), |
| 406 | sqlgraph.Edge(sqlgraph.M2O, true, alert.OwnerTable, alert.OwnerColumn), |
| 407 | ) |
| 408 | fromV = sqlgraph.Neighbors(_m.driver.Dialect(), step) |
| 409 | return fromV, nil |
| 410 | } |
| 411 | return query |
| 412 | } |
| 413 | |
| 414 | // QueryDecisions queries the decisions edge of a Alert. |
| 415 | func (c *AlertClient) QueryDecisions(_m *Alert) *DecisionQuery { |