database

package
v0.0.0-...-9a7116f Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCustomType

func ParseCustomType(src, del []byte) (elems [][]byte, err error)

ParseCustomType parses a Postgres custom type retrieved from the database.

func QuoteAndEscapeRecordValue

func QuoteAndEscapeRecordValue(text string) string

QuoteAndEscapeValue wraps escaped double quotes around single composite record values, and escapes specific special runes within the value. Composite record arrays line format looks like: {"(\"val1\",\"val2\")""} Escape code mostly copied from https://github.com/lib/pq/blob/master/encode.go#L160-L196

func QuoteString

func QuoteString(s string) string

QuoteString wraps a string properly for use in a Postgres custom type.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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