Versions in this module Expand all Collapse all v1 v1.13.2 Apr 1, 2022 Changes in this version + type Author struct + AuthorID int32 + Name string + type Book struct + AuthorID int32 + Available time.Time + 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 time.Time + 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 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 + GetAuthor func(ctx context.Context, authorID int32) (Author, error) + 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) GetAuthor(ctx context.Context, authorID int32) (Author, error) + 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