OnlyIDX is like OnlyID, but panics if an error occurs.
(ctx context.Context)
| 150 | |
| 151 | // OnlyIDX is like OnlyID, but panics if an error occurs. |
| 152 | func (sq *SettingQuery) OnlyIDX(ctx context.Context) int { |
| 153 | id, err := sq.OnlyID(ctx) |
| 154 | if err != nil { |
| 155 | panic(err) |
| 156 | } |
| 157 | return id |
| 158 | } |
| 159 | |
| 160 | // All executes the query and returns a list of Settings. |
| 161 | func (sq *SettingQuery) All(ctx context.Context) ([]*Setting, error) { |