Help us shape the future of Go! Take the 2026 Go Developer Survey

authors

package
v0.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	ID   int64
	Name string
	Bio  pgtype.Text
}

type CreateAuthorParams

type CreateAuthorParams struct {
	Name string
	Bio  pgtype.Text
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...any) (pgconn.CommandTag, error)
	Query(context.Context, string, ...any) (pgx.Rows, error)
	QueryRow(context.Context, string, ...any) pgx.Row
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) CreateAuthor

func (q *Queries) CreateAuthor(ctx context.Context, arg CreateAuthorParams) (Author, error)

func (*Queries) DeleteAuthor

func (q *Queries) DeleteAuthor(ctx context.Context, id int64) error

func (*Queries) GetAuthor

func (q *Queries) GetAuthor(ctx context.Context, id int64) (Author, error)

func (*Queries) ListAuthors

func (q *Queries) ListAuthors(ctx context.Context) ([]Author, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL