util

package
v7.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignStructVals

func AssignStructVals(i interface{}, results []rowData, cm ColumnMap)

func GetTypeInfo

func GetTypeInfo(i interface{}, val reflect.Value) (reflect.Type, reflect.Kind, bool)

func IsBool

func IsBool(k reflect.Kind) bool

func IsFloat

func IsFloat(k reflect.Kind) bool

func IsInt

func IsInt(k reflect.Kind) bool

func IsInvalid

func IsInvalid(k reflect.Kind) bool

func IsPointer

func IsPointer(k reflect.Kind) bool

func IsSlice

func IsSlice(k reflect.Kind) bool

func IsString

func IsString(k reflect.Kind) bool

func IsStruct

func IsStruct(k reflect.Kind) bool

func IsUint

func IsUint(k reflect.Kind) bool

func SetColumnRenameFunction

func SetColumnRenameFunction(newFunction func(string) string)

Types

type ColumnData

type ColumnData struct {
	ColumnName   string
	FieldIndex   []int
	ShouldInsert bool
	ShouldUpdate bool
	GoType       reflect.Type
}

type ColumnMap

type ColumnMap map[string]ColumnData

func GetColumnMap

func GetColumnMap(i interface{}) (ColumnMap, error)

func (ColumnMap) Cols added in v7.3.0

func (cm ColumnMap) Cols() []string

type ValueSlice

type ValueSlice []reflect.Value

func (ValueSlice) Equal

func (vs ValueSlice) Equal(other ValueSlice) bool

func (ValueSlice) Len

func (vs ValueSlice) Len() int

func (ValueSlice) Less

func (vs ValueSlice) Less(i, j int) bool

func (ValueSlice) String

func (vs ValueSlice) String() string

func (ValueSlice) Swap

func (vs ValueSlice) Swap(i, j int)

Jump to

Keyboard shortcuts

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