database

package
v0.0.0-...-50134b1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunWithTx

func RunWithTx(ctx context.Context, pool *pgxpool.Pool, fn func(q *sqlc.Queries) error) error

Types

type Database

type Database struct {
	Pool    *pgxpool.Pool
	Queries *sqlc.Queries
}

func NewDatabase

func NewDatabase(ctx context.Context) (*Database, error)

type TxRunner

type TxRunner = func(ctx context.Context, fn func(q *sqlc.Queries) error) error

func NewTxRunner

func NewTxRunner(pool *pgxpool.Pool) TxRunner

Jump to

Keyboard shortcuts

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