sqliteerr

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package sqliteerr maps SQLite constraint errors to gorm's sentinel errors. It is shared by the SQLite driver adapters, which only differ in how they read the extended result code from their driver's error type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Translate

func Translate(err error, extendedCode int) error

Translate wraps err, a SQLite error with the given extended result code, in the matching gorm sentinel, keeping err itself so callers can still read which constraint failed. An error that is already translated, or whose code has no sentinel, is returned unchanged.

Types

This section is empty.

Jump to

Keyboard shortcuts

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