OnlyIDX is like OnlyID, but panics if an error occurs.
(ctx context.Context)
| 203 | |
| 204 | // OnlyIDX is like OnlyID, but panics if an error occurs. |
| 205 | func (_q *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID { |
| 206 | id, err := _q.OnlyID(ctx) |
| 207 | if err != nil { |
| 208 | panic(err) |
| 209 | } |
| 210 | return id |
| 211 | } |
| 212 | |
| 213 | // All executes the query and returns a list of Users. |
| 214 | func (_q *UserQuery) All(ctx context.Context) ([]*User, error) { |