IDs executes the query and returns a list of Alert IDs.
(ctx context.Context)
| 277 | |
| 278 | // IDs executes the query and returns a list of Alert IDs. |
| 279 | func (_q *AlertQuery) IDs(ctx context.Context) (ids []int, err error) { |
| 280 | if _q.ctx.Unique == nil && _q.path != nil { |
| 281 | _q.Unique(true) |
| 282 | } |
| 283 | ctx = setContextOp(ctx, _q.ctx, ent.OpQueryIDs) |
| 284 | if err = _q.Select(alert.FieldID).Scan(ctx, &ids); err != nil { |
| 285 | return nil, err |
| 286 | } |
| 287 | return ids, nil |
| 288 | } |
| 289 | |
| 290 | // IDsX is like IDs, but panics if an error occurs. |
| 291 | func (_q *AlertQuery) IDsX(ctx context.Context) []int { |