parser

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetField

func GetField(tableFieldNames, selectField, omitField []string) []string

func GetTableName

func GetTableName(tableName string) string

func GetTableNameAndSubTableField

func GetTableNameAndSubTableField(model interface{}) (string, bool, error)

获取表名和分表信息

func GetValueTag

func GetValueTag(val reflect.Value, model interface{}, fieldName string) interface{}

func IsSlice

func IsSlice(v interface{}) bool

判断传入的参数是不是 切片[]MyStruct{},此处带入的是指针

func RoundDuration

func RoundDuration(d time.Duration) time.Duration

Types

type GetSubTableFielder

type GetSubTableFielder interface {
	GetSubTableField() string
}

type GetTableNamer

type GetTableNamer interface {
	GetTableName() string
}

获取表名

Jump to

Keyboard shortcuts

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