database

package
v0.0.0-...-c5541d2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteSQL

func ExecuteSQL(ctx context.Context, sql, user, password, host, db string, port uint32) error

Types

type DB

type DB struct {
	*gendb.Queries
	Pool *pgxpool.Pool
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, user, password, host, db string, port uint32) (*DB, error)

func NewTestDB

func NewTestDB(ctx context.Context) (*DB, func(t *testing.T), error)

func (*DB) Close

func (db *DB) Close() error

func (*DB) WithTx

func (db *DB) WithTx(ctx context.Context, fn func(dbTx *gendb.Queries) error) error

Jump to

Keyboard shortcuts

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