scan

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidType = fmt.Errorf("statement: invalid type for scan")
)

Functions

func IsSlice

func IsSlice(v interface{}) bool

IsSlice return true if the given interface{} holds a slice type

func Load

func Load(rows *sql.Rows, value interface{}) (int, error)

Load loads any value from sql.Rows

func StructMap

func StructMap(t reflect.Type) map[string][]int

StructMap builds index to fast lookup fields in struct

Types

type PointersExtractor

type PointersExtractor func(columns []string, value reflect.Value) []interface{}

PointersExtractor function type

func FindExtractor

func FindExtractor(t reflect.Type) (PointersExtractor, error)

FindExtractor returns a PointersExtractor for the given type

Jump to

Keyboard shortcuts

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