postgresx

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(conf postgres.Config) gorm.Dialector

New creates a new enhanced PostgreSQL dialector using a postgres.Config. This is a drop-in replacement for postgres.New() that provides enhanced error handling.

func Open

func Open(dsn string) gorm.Dialector

Open creates a new enhanced PostgreSQL dialector using a DSN string. This is a drop-in replacement for postgres.Open() that provides enhanced error handling.

Types

type Dialector

type Dialector struct {
	*postgres.Dialector
}

Dialector is an enhanced PostgreSQL dialector that preserves original error details alongside GORM error translations. It embeds the standard PostgreSQL dialector, inheriting all its capabilities while adding enhanced error handling.

func (*Dialector) Translate

func (d *Dialector) Translate(cause error) error

Jump to

Keyboard shortcuts

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