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

package querytest

import (
	"context"

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

const badQuery = `-- name: BadQuery :one
WITH
	q
		AS (
			SELECT
				authors.name, authors.bio
			FROM
				authors
				LEFT JOIN fake ON authors.name = fake.name
		)
SELECT
	c1.name, c1.bio, c2.name, c2.bio
FROM
	q AS c1,
	q as c2
`

type BadQueryRow struct {
	Name   string
	Bio    pgtype.Text
	Name_2 string
	Bio_2  pgtype.Text
}

func (q *Queries) BadQuery(ctx context.Context) (BadQueryRow, error) {
	row := q.db.QueryRow(ctx, badQuery)
	var i BadQueryRow
	err := row.Scan(
		&i.Name,
		&i.Bio,
		&i.Name_2,
		&i.Bio_2,
	)
	return i, err
}
