// Code generated by sqlc. DO NOT EDIT.
// versions:
//   sqlc v1.27.0
// source: query.sql

package querytest

import (
	"context"
)

const allRanked = `-- name: AllRanked :many
SELECT ranked, rank_by_effect_size, rank_by_abs_percent_change FROM changes_ranked
`

func (q *Queries) AllRanked(ctx context.Context) ([]ChangesRanked, error) {
	rows, err := q.db.Query(ctx, allRanked)
	if err != nil {
		return nil, err
	}
	defer rows.Close()
	var items []ChangesRanked
	for rows.Next() {
		var i ChangesRanked
		if err := rows.Scan(&i.Ranked, &i.RankByEffectSize, &i.RankByAbsPercentChange); err != nil {
			return nil, err
		}
		items = append(items, i)
	}
	if err := rows.Err(); err != nil {
		return nil, err
	}
	return items, nil
}
