(ctx context.Context, otype string)
| 204 | } |
| 205 | |
| 206 | func DBGetAllOIDsByType(ctx context.Context, otype string) ([]string, error) { |
| 207 | return WithTxRtn(ctx, func(tx *TxWrap) ([]string, error) { |
| 208 | rtn := make([]string, 0) |
| 209 | table := tableNameFromOType(otype) |
| 210 | query := fmt.Sprintf("SELECT oid FROM %s", table) |
| 211 | var rows []idDataType |
| 212 | tx.Select(&rows, query) |
| 213 | for _, row := range rows { |
| 214 | rtn = append(rtn, row.OId) |
| 215 | } |
| 216 | return rtn, nil |
| 217 | }) |
| 218 | } |
| 219 | |
| 220 | func DBGetAllObjsByType[T waveobj.WaveObj](ctx context.Context, otype string) ([]T, error) { |
| 221 | return WithTxRtn(ctx, func(tx *TxWrap) ([]T, error) { |
no test coverage detected