postgres

package
v0.0.0-...-4c047f0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context, dc DBConfig) (pool *pgxpool.Pool, err error)

Types

type Client

type Client interface {
	Exec(ctx context.Context, sql string, argument ...interface{}) (pgconn.CommandTag, error)
	Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error)
	QueryRow(ctx context.Context, sql string, args ...interface{}) pgx.Row
	Begin(ctx context.Context) (pgx.Tx, error)
	BeginTx(ctx context.Context, txOptions pgx.TxOptions) (pgx.Tx, error)
}

TODO: implement those or what? damn...

type DBConfig

type DBConfig struct {
	Username string
	Password string
	Host     string
	Port     string
	Database string
	SSLMode  string
	MaxAtts  int
}

Jump to

Keyboard shortcuts

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