postgres

package
v0.4.76 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMultiDimSlice

func CreateMultiDimSlice(dims []int, elements []any) any

converts flat slice to multi-dimensional slice

func FormatPgArrayLiteral

func FormatPgArrayLiteral(arr any, castType string) string

returns string in this form ARRAY[[a,b],[c,d]]

func IsJsonPgDataType added in v0.4.71

func IsJsonPgDataType(dataType string) bool

func IsPgArrayColumnDataType added in v0.4.67

func IsPgArrayColumnDataType(colDataType string) bool

func IsPgArrayType

func IsPgArrayType(dbTypeName string) bool

func SqlRowToPgTypesMap

func SqlRowToPgTypesMap(rows *sql.Rows) (map[string]any, error)

Types

type PgxArray

type PgxArray[T any] struct {
	pgtype.Array[T]
	// contains filtered or unexported fields
}

func (*PgxArray[T]) Scan

func (a *PgxArray[T]) Scan(src any) error

custom PGX array scanner properly handles scanning postgres arrays

Jump to

Keyboard shortcuts

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