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

package querytest

import (
	"context"

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

const getAuthor = `-- name: GetAuthor :one
WITH person AS(
    WITH summary AS(
        WITH mb AS(
            select
                id, name, bio
            from authors
        )
        SELECT
            bio
        FROM mb
        )
    SELECT
       count(*) as total
    FROM summary
)
select total from person
`

func (q *Queries) GetAuthor(ctx context.Context) (pgtype.Int8, error) {
	row := q.db.QueryRow(ctx, getAuthor)
	var total pgtype.Int8
	err := row.Scan(&total)
	return total, err
}
