Versions in this module Expand all Collapse all v1 v1.27.1 May 28, 2024 Changes in this version + var ErrBatchAlreadyClosed = errors.New("batch already closed") + type Author struct + AuthorID int32 + Biography []byte + Name string + type Book struct + AuthorID int32 + Available pgtype.Timestamptz + BookID int32 + BookType BookType + Isbn string + Tags []string + Title string + Year int32 + type BookType string + const BookTypeFICTION + const BookTypeNONFICTION + func (e *BookType) Scan(src interface{}) error + type BooksByYearBatchResults struct + func (b *BooksByYearBatchResults) Close() error + func (b *BooksByYearBatchResults) Query(f func(int, []Book, error)) + type CreateBookBatchResults struct + func (b *CreateBookBatchResults) Close() error + func (b *CreateBookBatchResults) QueryRow(f func(int, Book, error)) + type CreateBookParams struct + AuthorID int32 + Available pgtype.Timestamptz + BookType BookType + Isbn string + Tags []string + Title string + Year int32 + type DBTX interface + Exec func(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query func(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow func(context.Context, string, ...interface{}) pgx.Row + SendBatch func(context.Context, *pgx.Batch) pgx.BatchResults + type DeleteBookBatchResults struct + func (b *DeleteBookBatchResults) Close() error + func (b *DeleteBookBatchResults) Exec(f func(int, error)) + type DeleteBookNamedFuncBatchResults struct + func (b *DeleteBookNamedFuncBatchResults) Close() error + func (b *DeleteBookNamedFuncBatchResults) Exec(f func(int, error)) + type DeleteBookNamedSignBatchResults struct + func (b *DeleteBookNamedSignBatchResults) Close() error + func (b *DeleteBookNamedSignBatchResults) Exec(f func(int, error)) + type GetBiographyBatchResults struct + func (b *GetBiographyBatchResults) Close() error + func (b *GetBiographyBatchResults) QueryRow(f func(int, []byte, error)) + type NullBookType struct + BookType BookType + Valid bool + func (ns *NullBookType) Scan(value interface{}) error + func (ns NullBookType) Value() (driver.Value, error) + type Querier interface + BooksByYear func(ctx context.Context, year []int32) *BooksByYearBatchResults + CreateAuthor func(ctx context.Context, name string) (Author, error) + CreateBook func(ctx context.Context, arg []CreateBookParams) *CreateBookBatchResults + DeleteBook func(ctx context.Context, bookID []int32) *DeleteBookBatchResults + DeleteBookExecResult func(ctx context.Context, bookID int32) (pgconn.CommandTag, error) + DeleteBookNamedFunc func(ctx context.Context, bookID []int32) *DeleteBookNamedFuncBatchResults + DeleteBookNamedSign func(ctx context.Context, bookID []int32) *DeleteBookNamedSignBatchResults + GetAuthor func(ctx context.Context, authorID int32) (Author, error) + GetBiography func(ctx context.Context, authorID []int32) *GetBiographyBatchResults + UpdateBook func(ctx context.Context, arg []UpdateBookParams) *UpdateBookBatchResults + type Queries struct + func New(db DBTX) *Queries + func (q *Queries) BooksByYear(ctx context.Context, year []int32) *BooksByYearBatchResults + func (q *Queries) CreateAuthor(ctx context.Context, name string) (Author, error) + func (q *Queries) CreateBook(ctx context.Context, arg []CreateBookParams) *CreateBookBatchResults + func (q *Queries) DeleteBook(ctx context.Context, bookID []int32) *DeleteBookBatchResults + func (q *Queries) DeleteBookExecResult(ctx context.Context, bookID int32) (pgconn.CommandTag, error) + func (q *Queries) DeleteBookNamedFunc(ctx context.Context, bookID []int32) *DeleteBookNamedFuncBatchResults + func (q *Queries) DeleteBookNamedSign(ctx context.Context, bookID []int32) *DeleteBookNamedSignBatchResults + func (q *Queries) GetAuthor(ctx context.Context, authorID int32) (Author, error) + func (q *Queries) GetBiography(ctx context.Context, authorID []int32) *GetBiographyBatchResults + func (q *Queries) UpdateBook(ctx context.Context, arg []UpdateBookParams) *UpdateBookBatchResults + func (q *Queries) WithTx(tx pgx.Tx) *Queries + type UpdateBookBatchResults struct + func (b *UpdateBookBatchResults) Close() error + func (b *UpdateBookBatchResults) Exec(f func(int, error)) + type UpdateBookParams struct + BookID int32 + Tags []string + Title string