// Code generated by sqlc. DO NOT EDIT.
// versions:
//   sqlc v1.29.0
// source: example.sql

package exampletable

import (
	"context"

	"github.com/jackc/pgx/v5/pgtype"
)

const exampleQuery = `-- name: ExampleQuery :many
select id, foo from example_table
where foo < $1
`

func (q *Queries) ExampleQuery(ctx context.Context, db DBTX, foo pgtype.Text) ([]ExampleTable, error) {
	rows, err := db.Query(ctx, exampleQuery, foo)
	if err != nil {
		return nil, err
	}
	defer rows.Close()
	var items []ExampleTable
	for rows.Next() {
		var i ExampleTable
		if err := rows.Scan(&i.ID, &i.Foo); err != nil {
			return nil, err
		}
		items = append(items, i)
	}
	if err := rows.Err(); err != nil {
		return nil, err
	}
	return items, nil
}

const exampleQuery2 = `-- name: ExampleQuery2 :many
select id, foo from example_table
where foo = $1
`

func (q *Queries) ExampleQuery2(ctx context.Context, db DBTX, foo pgtype.Text) ([]ExampleTable, error) {
	rows, err := db.Query(ctx, exampleQuery2, foo)
	if err != nil {
		return nil, err
	}
	defer rows.Close()
	var items []ExampleTable
	for rows.Next() {
		var i ExampleTable
		if err := rows.Scan(&i.ID, &i.Foo); err != nil {
			return nil, err
		}
		items = append(items, i)
	}
	if err := rows.Err(); err != nil {
		return nil, err
	}
	return items, nil
}
