db

package
v0.0.0-...-91e0860 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrTx        = " error transaction"
	ErrCom       = " error commit transaction"
	ErrRollback  = " error to rollback"
	ExecRollback = " execute rollback"
)

Variables

View Source
var (
	ErrToRollback   = errors.New(" | error to execute rollback")
	ExecToRollback  = errors.New(" | execute rollback")
	ErrToCommit     = errors.New(" | error to commit")
	ErrNoAffected   = errors.New(" | error no row err no affected")
	ErrUserNotFound = errors.New(" | error user not found")
)

Functions

func ErrExec

func ErrExec(err error, exec pgconn.CommandTag) error

func ExecCommit

func ExecCommit(ctx context.Context, TX pgx.Tx) error

func Ilike

func Ilike(key string) string

func RollCommit

func RollCommit(err error, ctx context.Context, TX pgx.Tx) error

func RollbackTX

func RollbackTX(ctx context.Context, tx pgx.Tx) error

Types

type PgConfig

type PgConfig struct {
	Ctx context.Context
}

func New

func New(ctx context.Context) *PgConfig

func (*PgConfig) Conn

func (p *PgConfig) Conn() (*pgxpool.Pool, error)

Jump to

Keyboard shortcuts

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