Documentation
¶
Overview ¶
Package postgres reads PostgreSQL-specific values and errors through database/sql without requiring a driver dependency.
Index ¶
Constants ¶
View Source
const SqlStateUniqueViolation = "23505"
SqlStateUniqueViolation is the SQLSTATE code of unique constraint violations.
Variables ¶
View Source
var ErrMalformedTextArray = errors.New("malformed text array")
Functions ¶
func ParseTextArray ¶
ParseTextArray parses the output format of a one-dimensional PostgreSQL text array.
Types ¶
type TextArrayScanner ¶
type TextArrayScanner struct {
Target *[]string
}
TextArrayScanner scans a one-dimensional PostgreSQL text array in its output format ("{a,b,...}", elements double-quoted with backslash escaping when needed) into Target. A SQL NULL scans as nil; null array elements are rejected.
func (TextArrayScanner) Scan ¶
func (s TextArrayScanner) Scan(value any) error
Click to show internal directories.
Click to hide internal directories.