package sample

import "context"

type Rows interface{}

type DB interface {
	QueryContext(context.Context, string, ...any) (Rows, error)
}

func Load(ctx context.Context, db DB, ids []int) error {
	for _, id := range ids {
		_, err := db.QueryContext(ctx, "SELECT * FROM widgets WHERE name LIKE '%foo%' ORDER BY created_at", id)
		if err != nil {
			return err
		}
	}

	return nil
}