stringutil

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package stringutil contains basic string utility funcs for picard models, lookups, filters

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateNewTableAlias

func GenerateNewTableAlias(index *int) (alias string)

GenerateNewTableAlias is used to signify that we're starting a new query and also need to reset the alias counter to t0

func GenerateTableAlias

func GenerateTableAlias(index *int) (alias string)

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

func GetFilterType(v any) (reflect.Type, error)

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

func GetStructValue(v any) (reflect.Value, error)

GetStructValue returns the reflected value of a struct interface

func GetValueFromLookupString

func GetValueFromLookupString(value reflect.Value, lookupString string) reflect.Value

GetValueFromLookupString will look through a string recursively to get the property value

func StringSliceContainsKey

func StringSliceContainsKey(strings []string, key string) bool

StringSliceContainsKey determines if a string is present in a slice of strings

Types

This section is empty.

Jump to

Keyboard shortcuts

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