Documentation
      ¶
    
    
  
    
  
    Index ¶
- func CheckNil(v any) bool
 - func FromDBMap(v DBMappable, m map[string]interface{})
 - func FromMap[PT MapConverterPtr[T], T any](m map[string]any) PT
 - func GetMapGen[PT MapConverterPtr[T], T any](tx *txwrap.TxWrap, query string, args ...interface{}) PT
 - func GetMappable[PT DBMappablePtr[T], T any](tx *txwrap.TxWrap, query string, args ...interface{}) PT
 - func MakeGenMap[T HasSimpleKey](arr []T) map[string]T
 - func MakeGenMapInt64[T HasSimpleInt64Key](arr []T) map[int64]T
 - func ParseJsonArr[T any](val string) []T
 - func ParseJsonMap(val string, forceMake bool) map[string]any
 - func QuickJson(v any) string
 - func QuickJsonArr(v any) string
 - func QuickJsonArrBytes(v any) []byte
 - func QuickJsonBytes(v any) []byte
 - func QuickNullableJson(v any) string
 - func QuickScanJson(ptr any, val any) error
 - func QuickSetBool(bval *bool, m map[string]any, name string)
 - func QuickSetBytes(bval *[]byte, m map[string]any, name string)
 - func QuickSetInt(ival *int, m map[string]any, name string)
 - func QuickSetInt64(ival *int64, m map[string]any, name string)
 - func QuickSetJson(ptr any, m map[string]any, name string)
 - func QuickSetJsonArr(ptr any, m map[string]any, name string)
 - func QuickSetNullableInt64(ival **int64, m map[string]any, name string)
 - func QuickSetNullableJson(ptr any, m map[string]any, name string)
 - func QuickSetStr(strVal *string, m map[string]any, name string)
 - func QuickValueJson(v any) (driver.Value, error)
 - func SelectMappable[PT DBMappablePtr[T], T any](tx *txwrap.TxWrap, query string, args ...interface{}) []PT
 - func SelectMapsGen[PT MapConverterPtr[T], T any](tx *txwrap.TxWrap, query string, args ...interface{}) []PT
 - func SelectSimpleMap[T any](tx *txwrap.TxWrap, query string, args ...interface{}) map[string]T
 - func ToDBMap(v DBMappable, useBytes bool) map[string]interface{}
 - type DBMappable
 - type DBMappablePtr
 - type HasSimpleInt64Key
 - type HasSimpleKey
 - type MapConverter
 - type MapConverterPtr
 - type MapEntry
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromDBMap ¶
func FromDBMap(v DBMappable, m map[string]interface{})
func GetMapGen ¶
func GetMapGen[PT MapConverterPtr[T], T any](tx *txwrap.TxWrap, query string, args ...interface{}) PT
func GetMappable ¶
func GetMappable[PT DBMappablePtr[T], T any](tx *txwrap.TxWrap, query string, args ...interface{}) PT
func MakeGenMap ¶
func MakeGenMap[T HasSimpleKey](arr []T) map[string]T
func MakeGenMapInt64 ¶
func MakeGenMapInt64[T HasSimpleInt64Key](arr []T) map[int64]T
func ParseJsonArr ¶ added in v0.11.1
func ParseJsonMap ¶ added in v0.11.1
on error will return nil unless forceMake is set, in which case it returns make(map[string]any)
func QuickJsonArr ¶
func QuickJsonArrBytes ¶
func QuickJsonBytes ¶
func QuickNullableJson ¶
func QuickScanJson ¶
func QuickSetNullableInt64 ¶
func SelectMappable ¶
func SelectMappable[PT DBMappablePtr[T], T any](tx *txwrap.TxWrap, query string, args ...interface{}) []PT
func SelectMapsGen ¶
func SelectMapsGen[PT MapConverterPtr[T], T any](tx *txwrap.TxWrap, query string, args ...interface{}) []PT
func SelectSimpleMap ¶
func ToDBMap ¶
func ToDBMap(v DBMappable, useBytes bool) map[string]interface{}
Types ¶
type DBMappable ¶
type DBMappable interface {
	UseDBMap()
}
    type DBMappablePtr ¶
type DBMappablePtr[T any] interface { DBMappable *T }
type HasSimpleInt64Key ¶
type HasSimpleInt64Key interface {
	GetSimpleKey() int64
}
    type HasSimpleKey ¶
type HasSimpleKey interface {
	GetSimpleKey() string
}
    type MapConverter ¶
type MapConverterPtr ¶
type MapConverterPtr[T any] interface { MapConverter *T }
 Click to show internal directories. 
   Click to hide internal directories.