db

package
v0.0.0-...-7dcf9b1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	DB() DB
	Close() error
}

type DB

type DB interface {
	SQLExecer
	Transactor
	Pinger
	Close()
}

type Handler

type Handler func(ctx context.Context) error

type NamedExecer

type NamedExecer interface {
	ScanOneContext(ctx context.Context, dest interface{}, q Query, args ...interface{}) error
	ScanAllContext(ctx context.Context, dest interface{}, q Query, args ...interface{}) error
}

type Pinger

type Pinger interface {
	Ping(ctx context.Context) error
}

type Query

type Query struct {
	Name     string
	QueryRaw string
}

type QueryExecer

type QueryExecer interface {
	ExecContext(ctx context.Context, q Query, args ...interface{}) (pgconn.CommandTag, error)
	QueryContext(ctx context.Context, q Query, args ...interface{}) (pgx.Rows, error)
	QueryRowContext(ctx context.Context, q Query, args ...interface{}) pgx.Row
}

type SQLExecer

type SQLExecer interface {
	NamedExecer
	QueryExecer
}

type Transactor

type Transactor interface {
	BeginTx(ctx context.Context, txOptions pgx.TxOptions) (pgx.Tx, error)
}

type TxManager

type TxManager interface {
	ReadCommitted(ctx context.Context, f Handler) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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