pg

package
v0.0.0-...-2e2f8e6 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: GPL-3.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

func Connect

func Connect(ctx context.Context, path string) (*Database, error)

func (*Database) Ping

func (db *Database) Ping() error

func (*Database) WithTx

func (db *Database) WithTx(ctx context.Context, f func(ctx context.Context, tx Tx) error) error

type Row

type Row interface {
	Scan(args ...interface{}) error
}

type Tx

type Tx interface {
	Exec(ctx context.Context, query string, args ...interface{}) error
	QueryRow(ctx context.Context, query string, args ...interface{}) Row
}

Jump to

Keyboard shortcuts

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