postgresql

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

PostgreSQL

Installation

go get github.com/tpm-common/gommon/postgresql

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("item not found")

Functions

This section is empty.

Types

type PostgreSQL

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

func New

func New() *PostgreSQL

func (*PostgreSQL) Connect

func (pg *PostgreSQL) Connect(ctx context.Context, connString string) error

func (PostgreSQL) Exec

func (pg PostgreSQL) Exec(ctx context.Context, sql string, args ...any) (pgconn.CommandTag, error)

func (PostgreSQL) Query

func (pg PostgreSQL) Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error)

func (PostgreSQL) QueryAll

func (pg PostgreSQL) QueryAll(ctx context.Context, dst interface{}, sql string, args ...interface{}) error

func (PostgreSQL) QueryOne

func (pg PostgreSQL) QueryOne(ctx context.Context, dst interface{}, sql string, args ...interface{}) error

func (PostgreSQL) ScanAll

func (pg PostgreSQL) ScanAll(dst any, rows pgx.Rows) error

func (PostgreSQL) ScanOne

func (pg PostgreSQL) ScanOne(dst any, rows pgx.Rows) error

Jump to

Keyboard shortcuts

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