func (q *DBQuerier) CreateUserScan(results pgx.BatchResults) (pgconn.CommandTag, error) {
	cmdTag, err := results.Exec()
	if err != nil {
		return cmdTag, fmt.Errorf("exec CreateUserBatch: %w", err)
	}
	return cmdTag, err
}
CreateUserScan implements Querier.CreateUserScan.
package pgcrypto
import (
	"context"
	"fmt"
	"github.com/jackc/pgconn"
	"github.com/jackc/pgtype"
	"github.com/jackc/pgx/v4"
)
type Querier interface {
	CreateUser(ctx context.Context, email string, password string) (pgconn.CommandTag, error)
	CreateUserBatch(batch genericBatch, email string, password string)
	CreateUserScan(results pgx.BatchResults) (pgconn.CommandTag, error)
	FindUser(ctx context.Context, email string) (FindUserRow, error)
	FindUserBatch(batch genericBatch, email string)
	FindUserScan(results pgx.BatchResults) (FindUserRow, 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, createUserSQL, createUserSQL); err != nil {
		return fmt.Errorf("prepare query 'CreateUser': %w", err)
	}
	if _, err := p.Prepare(ctx, findUserSQL, findUserSQL); err != nil {
		return fmt.Errorf("prepare query 'FindUser': %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 createUserSQL = `INSERT INTO "user" (email, pass)
VALUES ($1, crypt($2, gen_salt('bf')));`
func (q *DBQuerier) CreateUser(ctx context.Context, email string, password string) (pgconn.CommandTag, error) {
	ctx = context.WithValue(ctx, "pggen_query_name", "CreateUser")
	cmdTag, err := q.conn.Exec(ctx, createUserSQL, email, password)
	if err != nil {
		return cmdTag, fmt.Errorf("exec query CreateUser: %w", err)
	}
	return cmdTag, err
}
func (q *DBQuerier) CreateUserBatch(batch genericBatch, email string, password string) {
	batch.Queue(createUserSQL, email, password)
}