QueryDecisions queries the decisions edge of a Alert.
(_m *Alert)
| 413 | |
| 414 | // QueryDecisions queries the decisions edge of a Alert. |
| 415 | func (c *AlertClient) QueryDecisions(_m *Alert) *DecisionQuery { |
| 416 | query := (&DecisionClient{config: c.config}).Query() |
| 417 | query.path = func(context.Context) (fromV *sql.Selector, _ error) { |
| 418 | id := _m.ID |
| 419 | step := sqlgraph.NewStep( |
| 420 | sqlgraph.From(alert.Table, alert.FieldID, id), |
| 421 | sqlgraph.To(decision.Table, decision.FieldID), |
| 422 | sqlgraph.Edge(sqlgraph.O2M, false, alert.DecisionsTable, alert.DecisionsColumn), |
| 423 | ) |
| 424 | fromV = sqlgraph.Neighbors(_m.driver.Dialect(), step) |
| 425 | return fromV, nil |
| 426 | } |
| 427 | return query |
| 428 | } |
| 429 | |
| 430 | // QueryEvents queries the events edge of a Alert. |
| 431 | func (c *AlertClient) QueryEvents(_m *Alert) *EventQuery { |