db

package
v0.0.0-...-93f7374 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 5 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 {
	Close() error
	DB() *DB
}

func NewClient

func NewClient(ctx context.Context, dsn string) (Client, error)

type DB

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

func (*DB) Close

func (db *DB) Close()

func (*DB) ExecContext

func (db *DB) ExecContext(ctx context.Context, q Query, args ...any) (pgconn.CommandTag, error)

func (*DB) GetContext

func (db *DB) GetContext(ctx context.Context, dest any, q Query, args ...any) error

func (*DB) QueryContext

func (db *DB) QueryContext(ctx context.Context, q Query, args ...any) (pgx.Rows, error)

func (*DB) QueryRowContext

func (db *DB) QueryRowContext(ctx context.Context, q Query, args ...any) pgx.Row

func (*DB) SelectContext

func (db *DB) SelectContext(ctx context.Context, dest any, q Query, args ...any) error

type Query

type Query struct {
	Name     string
	QueryRaw string
}

Jump to

Keyboard shortcuts

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