db

package
v0.0.0-...-99476fd Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postgres

type Postgres struct {
	*sqlc.Queries
	// contains filtered or unexported fields
}

func NewPostgres

func NewPostgres(ctx context.Context, connStr string) (*Postgres, error)

func (*Postgres) Exec

func (p *Postgres) Exec(ctx context.Context, query string, args ...any) (pgconn.CommandTag, error)

func (*Postgres) Query

func (p *Postgres) Query(ctx context.Context, query string, args ...any) (pgx.Rows, error)

func (*Postgres) QueryRow

func (p *Postgres) QueryRow(ctx context.Context, query string, args ...any) pgx.Row

func (*Postgres) Tx

func (p *Postgres) Tx(ctx context.Context, fn func(pgx.Tx) error) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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