pgerrcode

package
v1.111.0-rc Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package pgerrcode implements postgres error extraction without depending on a postgres library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromError

func FromError(err error) string

FromError returns the 5-character PostgreSQL error code string associated with the given error, if any.

func IsConstraintViolation

func IsConstraintViolation(err error) bool

IsConstraintViolation returns true if provided error belongs to Integrity Constraint Violation, Class 23.

func IsInvalidSyntax

func IsInvalidSyntax(err error) bool

IsInvalidSyntax returns whether the query syntax is invalid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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