OnlyIDX is like OnlyID, but panics if an error occurs.
(ctx context.Context)
| 249 | |
| 250 | // OnlyIDX is like OnlyID, but panics if an error occurs. |
| 251 | func (_q *AlertQuery) OnlyIDX(ctx context.Context) int { |
| 252 | id, err := _q.OnlyID(ctx) |
| 253 | if err != nil { |
| 254 | panic(err) |
| 255 | } |
| 256 | return id |
| 257 | } |
| 258 | |
| 259 | // All executes the query and returns a list of Alerts. |
| 260 | func (_q *AlertQuery) All(ctx context.Context) ([]*Alert, error) { |