OnlyIDX is like OnlyID, but panics if an error occurs.
(ctx context.Context)
| 223 | |
| 224 | // OnlyIDX is like OnlyID, but panics if an error occurs. |
| 225 | func (eq *EntityQuery) OnlyIDX(ctx context.Context) int { |
| 226 | id, err := eq.OnlyID(ctx) |
| 227 | if err != nil { |
| 228 | panic(err) |
| 229 | } |
| 230 | return id |
| 231 | } |
| 232 | |
| 233 | // All executes the query and returns a list of Entities. |
| 234 | func (eq *EntityQuery) All(ctx context.Context) ([]*Entity, error) { |