QueryMetas queries the metas edge of a Alert.
(_m *Alert)
| 445 | |
| 446 | // QueryMetas queries the metas edge of a Alert. |
| 447 | func (c *AlertClient) QueryMetas(_m *Alert) *MetaQuery { |
| 448 | query := (&MetaClient{config: c.config}).Query() |
| 449 | query.path = func(context.Context) (fromV *sql.Selector, _ error) { |
| 450 | id := _m.ID |
| 451 | step := sqlgraph.NewStep( |
| 452 | sqlgraph.From(alert.Table, alert.FieldID, id), |
| 453 | sqlgraph.To(meta.Table, meta.FieldID), |
| 454 | sqlgraph.Edge(sqlgraph.O2M, false, alert.MetasTable, alert.MetasColumn), |
| 455 | ) |
| 456 | fromV = sqlgraph.Neighbors(_m.driver.Dialect(), step) |
| 457 | return fromV, nil |
| 458 | } |
| 459 | return query |
| 460 | } |
| 461 | |
| 462 | // Hooks returns the client hooks. |
| 463 | func (c *AlertClient) Hooks() []Hook { |