dbutil

package
v0.0.0-...-d88c8eb Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package dbutil provides shared helpers for database-layer operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsUniqueViolation

func IsUniqueViolation(err error) bool

IsUniqueViolation reports whether err is a Postgres unique constraint violation (SQLSTATE 23505).

func MergeSettings

func MergeSettings(existing, newSettings json.RawMessage) json.RawMessage

MergeSettings returns newSettings with any keys absent from newSettings filled in from existing. Keys present in newSettings always win. This is used to preserve secret fields (passwords, API keys) when the frontend omits them from an update request.

Types

This section is empty.

Jump to

Keyboard shortcuts

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