OnlyIDX is like OnlyID, but panics if an error occurs.
(ctx context.Context)
| 367 | |
| 368 | // OnlyIDX is like OnlyID, but panics if an error occurs. |
| 369 | func (uq *UserQuery) OnlyIDX(ctx context.Context) int { |
| 370 | id, err := uq.OnlyID(ctx) |
| 371 | if err != nil { |
| 372 | panic(err) |
| 373 | } |
| 374 | return id |
| 375 | } |
| 376 | |
| 377 | // All executes the query and returns a list of Users. |
| 378 | func (uq *UserQuery) All(ctx context.Context) ([]*User, error) { |