Help us shape the future of Go! Take the 2026 Go Developer Survey

sqlerrors

package
v0.0.0-...-bffc49d Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package sqlerrors contains shared database error mappings.

Index

Constants

This section is empty.

Variables

EntityToErrAlreadyExists maps entities to duplicate-entry domain errors.

EntityToErrDoesNotExist maps entities to missing-record domain errors.

EntityToErrForeignKeyConstraint maps entities to delete constraint errors.

Functions

func MappedEntityError

func MappedEntityError(entityErrors map[Entity]error, entity Entity, fallback error) error

MappedEntityError returns the mapped error for an entity or the fallback.

Types

type Entity

type Entity string

Entity identifies a database table used by repository error parsing.

const (
	EntitySheet   Entity = "sheets"
	EntityRoaster Entity = "roasters"
	EntityBeans   Entity = "beans"
	EntityShot    Entity = "shots"
)

Jump to

Keyboard shortcuts

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