Documentation
¶
Overview ¶
Package stringutil contains basic string utility funcs for picard models, lookups, filters
Index ¶
- func GenerateNewTableAlias(index *int) (alias string)
- func GenerateTableAlias(index *int) (alias string)
- func GetFilterType(v interface{}) (reflect.Type, error)
- func GetStructValue(v interface{}) (reflect.Value, error)
- func GetValueFromLookupString(value reflect.Value, lookupString string) reflect.Value
- func StringSliceContainsKey(strings []string, key string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNewTableAlias ¶
GenerateNewTableAlias is used to signify that we're starting a new query and also need to reset the alias counter to t0
func GenerateTableAlias ¶
GenerateTableAlias generates a table alias for queries, joins, etc in the format of `t0`, `t1`, etc. This is to conform with existing tests as well as maintain state across recursive functions.
func GetFilterType ¶
GetFilterType returns the type of the interface if it is a struct If it is a slice, it returns the type of the elements inside the struct
func GetStructValue ¶
GetStructValue returns the reflected value of a struct interface
func GetValueFromLookupString ¶
GetValueFromLookupString will look through a string recursively to get the property value
func StringSliceContainsKey ¶
StringSliceContainsKey determines if a string is present in a slice of strings
Types ¶
This section is empty.