pgx_collect

package
v0.0.0-...-c46e0ea Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearStructFieldCaches

func ClearStructFieldCaches()

ClearCaches clears all caches of struct field information. This is intended only for testing. This is not synchronized with access of the caches, and so must not be called simultaneously with any active use of pgx-collect.

func CollidingFieldSets

func CollidingFieldSets(typ reflect.Type, fields []string) [][]string

CollidingFieldSets returns all field-sets for a type that collided in the hash-table with the given keys. (Including the provided one, assuming it's in the table.)

Types

type StructRowFieldReceiver

type StructRowFieldReceiver reflect.Value

func ReceiverFromPointer

func ReceiverFromPointer[T any](ptr *T) StructRowFieldReceiver

type StructRowFields

type StructRowFields []structRowField

func GetStructRowFieldsByName

func GetStructRowFieldsByName(
	typ reflect.Type,
	fldDescs []pgconn.FieldDescription,
) (StructRowFields, string, error)

func GetStructRowFieldsByPos

func GetStructRowFieldsByPos(
	typ reflect.Type,
	fldDescs []pgconn.FieldDescription,
) (StructRowFields, error)

func (StructRowFields) NumFields

func (fs StructRowFields) NumFields() int

func (StructRowFields) Populate

func (fs StructRowFields) Populate(r StructRowFieldReceiver, scanTargets []any)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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