func (q *DBQuerier) VoidThree2Scan(results pgx.BatchResults) ([]string, error) {
	rows, err := results.Query()
	if err != nil {
		return nil, fmt.Errorf("query VoidThree2Batch: %w", err)
	}
	defer rows.Close()
	items := []string{}
	for rows.Next() {
		var item string
		if err := rows.Scan(&item, nil, nil); err != nil {
			return nil, fmt.Errorf("scan VoidThree2Batch row: %w", err)
		}
		items = append(items, item)
	}
	if err := rows.Err(); err != nil {
		return nil, fmt.Errorf("close VoidThree2Batch rows: %w", err)
	}
	return items, err
}
VoidThree2Scan implements Querier.VoidThree2Scan.
package void
import (
	"context"
	"fmt"
	"github.com/jackc/pgconn"
	"github.com/jackc/pgtype"
	"github.com/jackc/pgx/v4"
)
type Querier interface {
	VoidOnly(ctx context.Context) (pgconn.CommandTag, error)
	VoidOnlyBatch(batch genericBatch)
	VoidOnlyScan(results pgx.BatchResults) (pgconn.CommandTag, error)
	VoidOnlyTwoParams(ctx context.Context, id int32) (pgconn.CommandTag, error)
	VoidOnlyTwoParamsBatch(batch genericBatch, id int32)
	VoidOnlyTwoParamsScan(results pgx.BatchResults) (pgconn.CommandTag, error)
	VoidTwo(ctx context.Context) (string, error)
	VoidTwoBatch(batch genericBatch)
	VoidTwoScan(results pgx.BatchResults) (string, error)
	VoidThree(ctx context.Context) (VoidThreeRow, error)
	VoidThreeBatch(batch genericBatch)
	VoidThreeScan(results pgx.BatchResults) (VoidThreeRow, error)
	VoidThree2(ctx context.Context) ([]string, error)
	VoidThree2Batch(batch genericBatch)
	VoidThree2Scan(results pgx.BatchResults) ([]string, error)
}
type DBQuerier struct {
	conn  genericConn    
	types *typeResolver  
}
var _ Querier = &DBQuerier{}
type genericConn interface {
	Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error)
	QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row
	Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error)
}
type genericBatch interface {
	Queue(query string, arguments ...interface{})
}
func NewQuerier(conn genericConn) *DBQuerier {
	return NewQuerierConfig(conn, QuerierConfig{})
}
type QuerierConfig struct {
	DataTypes []pgtype.DataType
}
func NewQuerierConfig(conn genericConn, cfg QuerierConfig) *DBQuerier {
	return &DBQuerier{conn: conn, types: newTypeResolver(cfg.DataTypes)}
}
func (q *DBQuerier) WithTx(tx pgx.Tx) (*DBQuerier, error) {
	return &DBQuerier{conn: tx}, nil
}
type preparer interface {
	Prepare(ctx context.Context, name, sql string) (sd *pgconn.StatementDescription, err error)
}
func PrepareAllQueries(ctx context.Context, p preparer) error {
	if _, err := p.Prepare(ctx, voidOnlySQL, voidOnlySQL); err != nil {
		return fmt.Errorf("prepare query 'VoidOnly': %w", err)
	}
	if _, err := p.Prepare(ctx, voidOnlyTwoParamsSQL, voidOnlyTwoParamsSQL); err != nil {
		return fmt.Errorf("prepare query 'VoidOnlyTwoParams': %w", err)
	}
	if _, err := p.Prepare(ctx, voidTwoSQL, voidTwoSQL); err != nil {
		return fmt.Errorf("prepare query 'VoidTwo': %w", err)
	}
	if _, err := p.Prepare(ctx, voidThreeSQL, voidThreeSQL); err != nil {
		return fmt.Errorf("prepare query 'VoidThree': %w", err)
	}
	if _, err := p.Prepare(ctx, voidThree2SQL, voidThree2SQL); err != nil {
		return fmt.Errorf("prepare query 'VoidThree2': %w", err)
	}
	return nil
}
type typeResolver struct {
	connInfo *pgtype.ConnInfo  
}
func newTypeResolver(types []pgtype.DataType) *typeResolver {
	ci := pgtype.NewConnInfo()
	for _, typ := range types {
		if txt, ok := typ.Value.(textPreferrer); ok && typ.OID != unknownOID {
			typ.Value = txt.ValueTranscoder
		}
		ci.RegisterDataType(typ)
	}
	return &typeResolver{connInfo: ci}
}
func (tr *typeResolver) findValue(name string) (uint32, pgtype.ValueTranscoder, bool) {
	typ, ok := tr.connInfo.DataTypeForName(name)
	if !ok {
		return 0, nil, false
	}
	v := pgtype.NewValue(typ.Value)
	return typ.OID, v.(pgtype.ValueTranscoder), true
}
func (tr *typeResolver) setValue(vt pgtype.ValueTranscoder, val interface{}) pgtype.ValueTranscoder {
	if err := vt.Set(val); err != nil {
		panic(fmt.Sprintf("set ValueTranscoder %T to %+v: %s", vt, val, err))
	}
	return vt
}
const voidOnlySQL = `SELECT void_fn();`
func (q *DBQuerier) VoidOnly(ctx context.Context) (pgconn.CommandTag, error) {
	ctx = context.WithValue(ctx, "pggen_query_name", "VoidOnly")
	cmdTag, err := q.conn.Exec(ctx, voidOnlySQL)
	if err != nil {
		return cmdTag, fmt.Errorf("exec query VoidOnly: %w", err)
	}
	return cmdTag, err
}
func (q *DBQuerier) VoidOnlyBatch(batch genericBatch) {
	batch.Queue(voidOnlySQL)
}
func (q *DBQuerier) VoidOnlyScan(results pgx.BatchResults) (pgconn.CommandTag, error) {
	cmdTag, err := results.Exec()
	if err != nil {
		return cmdTag, fmt.Errorf("exec VoidOnlyBatch: %w", err)
	}
	return cmdTag, err
}
const voidOnlyTwoParamsSQL = `SELECT void_fn_two_params($1, 'text');`
func (q *DBQuerier) VoidOnlyTwoParams(ctx context.Context, id int32) (pgconn.CommandTag, error) {
	ctx = context.WithValue(ctx, "pggen_query_name", "VoidOnlyTwoParams")
	cmdTag, err := q.conn.Exec(ctx, voidOnlyTwoParamsSQL, id)
	if err != nil {
		return cmdTag, fmt.Errorf("exec query VoidOnlyTwoParams: %w", err)
	}
	return cmdTag, err
}
func (q *DBQuerier) VoidOnlyTwoParamsBatch(batch genericBatch, id int32) {
	batch.Queue(voidOnlyTwoParamsSQL, id)
}
func (q *DBQuerier) VoidOnlyTwoParamsScan(results pgx.BatchResults) (pgconn.CommandTag, error) {
	cmdTag, err := results.Exec()
	if err != nil {
		return cmdTag, fmt.Errorf("exec VoidOnlyTwoParamsBatch: %w", err)
	}
	return cmdTag, err
}
const voidTwoSQL = `SELECT void_fn(), 'foo' as name;`
func (q *DBQuerier) VoidTwo(ctx context.Context) (string, error) {
	ctx = context.WithValue(ctx, "pggen_query_name", "VoidTwo")
	row := q.conn.QueryRow(ctx, voidTwoSQL)
	var item string
	if err := row.Scan(nil, &item); err != nil {
		return item, fmt.Errorf("query VoidTwo: %w", err)
	}
	return item, nil
}
func (q *DBQuerier) VoidTwoBatch(batch genericBatch) {
	batch.Queue(voidTwoSQL)
}
func (q *DBQuerier) VoidTwoScan(results pgx.BatchResults) (string, error) {
	row := results.QueryRow()
	var item string
	if err := row.Scan(nil, &item); err != nil {
		return item, fmt.Errorf("scan VoidTwoBatch row: %w", err)
	}
	return item, nil
}
const voidThreeSQL = `SELECT void_fn(), 'foo' as foo, 'bar' as bar;`
type VoidThreeRow struct {
	Foo string `json:"foo"`
	Bar string `json:"bar"`
}
func (q *DBQuerier) VoidThree(ctx context.Context) (VoidThreeRow, error) {
	ctx = context.WithValue(ctx, "pggen_query_name", "VoidThree")
	row := q.conn.QueryRow(ctx, voidThreeSQL)
	var item VoidThreeRow
	if err := row.Scan(nil, &item.Foo, &item.Bar); err != nil {
		return item, fmt.Errorf("query VoidThree: %w", err)
	}
	return item, nil
}
func (q *DBQuerier) VoidThreeBatch(batch genericBatch) {
	batch.Queue(voidThreeSQL)
}
func (q *DBQuerier) VoidThreeScan(results pgx.BatchResults) (VoidThreeRow, error) {
	row := results.QueryRow()
	var item VoidThreeRow
	if err := row.Scan(nil, &item.Foo, &item.Bar); err != nil {
		return item, fmt.Errorf("scan VoidThreeBatch row: %w", err)
	}
	return item, nil
}
const voidThree2SQL = `SELECT 'foo' as foo, void_fn(), void_fn();`
func (q *DBQuerier) VoidThree2(ctx context.Context) ([]string, error) {
	ctx = context.WithValue(ctx, "pggen_query_name", "VoidThree2")
	rows, err := q.conn.Query(ctx, voidThree2SQL)
	if err != nil {
		return nil, fmt.Errorf("query VoidThree2: %w", err)
	}
	defer rows.Close()
	items := []string{}
	for rows.Next() {
		var item string
		if err := rows.Scan(&item, nil, nil); err != nil {
			return nil, fmt.Errorf("scan VoidThree2 row: %w", err)
		}
		items = append(items, item)
	}
	if err := rows.Err(); err != nil {
		return nil, fmt.Errorf("close VoidThree2 rows: %w", err)
	}
	return items, err
}
func (q *DBQuerier) VoidThree2Batch(batch genericBatch) {
	batch.Queue(voidThree2SQL)
}