OnlyIDX is like OnlyID, but panics if an error occurs.
(ctx context.Context)
| 199 | |
| 200 | // OnlyIDX is like OnlyID, but panics if an error occurs. |
| 201 | func (sq *ShareQuery) OnlyIDX(ctx context.Context) int { |
| 202 | id, err := sq.OnlyID(ctx) |
| 203 | if err != nil { |
| 204 | panic(err) |
| 205 | } |
| 206 | return id |
| 207 | } |
| 208 | |
| 209 | // All executes the query and returns a list of Shares. |
| 210 | func (sq *ShareQuery) All(ctx context.Context) ([]*Share, error) { |