reflectx

package
v0.0.0-...-bc73854 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActualValue

func ActualValue(v reflect.Value) reflect.Value

func IsBasicType

func IsBasicType(t reflect.Type) bool

func IsBasicValue

func IsBasicValue(value reflect.Value) bool

func IsSliceType

func IsSliceType(value reflect.Type) bool

func IsStructType

func IsStructType(t reflect.Type) bool

func IsStructValue

func IsStructValue(value reflect.Value) bool

func ReflectProperty

func ReflectProperty(v reflect.Value, mapping map[string]Property)

Types

type Column

type Column struct {
	Name  string
	Value interface{}
}

type Properties

type Properties []Property

Properties is a property array

func NewProperties

func NewProperties(n int) Properties

NewProperties return a Properties

func (Properties) Len

func (p Properties) Len() int

func (Properties) Less

func (p Properties) Less(i, j int) bool

func (Properties) Swap

func (p Properties) Swap(i, j int)

func (Properties) Values

func (p Properties) Values() []interface{}

Values return all values of Properties

type Property

type Property struct {
	InterValue interface{}
	Value      *reflect.Value
	Tag        *Tag
}

Property contains the value and tags of a field

type Tag

type Tag struct {
	Column        string
	PrimaryKey    bool
	Insert        string
	Update        string
	AutoIncrement bool
}

Tag contains all info of `dbx` tag

Jump to

Keyboard shortcuts

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