Documentation ¶
Index ¶
- func AsAnyMap[T any, K comparable](m map[K]T) map[K]any
- func AsAnyMapCoercingNils[T any, K comparable](m map[K]T) map[K]any
- func AsAnySlice[T any](slice []T) []any
- func AsAnySliceCoercingNils[T any](slice []T) []any
- func AsBool[T comparable](v T) bool
- func AtoiRef(v *string) (*int, error)
- func BoolRefToNullBool(p *bool) sql.NullBool
- func BoolTo[T constraints.Integer](v bool) T
- func ByteRefToNullByte(p *byte) sql.NullByte
- func CoerceIntMap[TReturn constraints.Integer, TArg constraints.Integer, K comparable](m map[K]TArg) map[K]TReturn
- func CoerceIntRef[TReturn constraints.Integer, TArg constraints.Integer](v *TArg) *TReturn
- func CoerceIntSlice[TReturn constraints.Integer, TArg constraints.Integer](slice []TArg) []TReturn
- func Float64RefToNullFloat64(p *float64) sql.NullFloat64
- func IndirectOr[T any](v *T, defaultValue T) T
- func Int16RefToNullInt16(p *int16) sql.NullInt16
- func Int32RefToNullInt32(p *int32) sql.NullInt32
- func Int64RefToNullInt64(p *int64) sql.NullInt64
- func ItoaRef(v *int) *string
- func NullBoolToBoolRef(v sql.NullBool) *bool
- func NullByteToByteRef(v sql.NullByte) *byte
- func NullFloat64ToFloat64Ref(v sql.NullFloat64) *float64
- func NullInt16ToInt16Ref(v sql.NullInt16) *int16
- func NullInt32ToInt32Ref(v sql.NullInt32) *int32
- func NullInt64ToInt64Ref(v sql.NullInt64) *int64
- func NullStringToStringRef(v sql.NullString) *string
- func NullTimeToTimeRef(v sql.NullTime) *time.Time
- func Ref[T any](v T) *T
- func StringRefToNullString(p *string) sql.NullString
- func TimeRefToNullTime(p *time.Time) sql.NullTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsAnyMap ¶
func AsAnyMap[T any, K comparable](m map[K]T) map[K]any
AsAnyMap converts map[K]T into map[K]any
func AsAnyMapCoercingNils ¶
func AsAnyMapCoercingNils[T any, K comparable](m map[K]T) map[K]any
AsAnyMapCoercingNils converts map[K]T into map[K]any, coercing typed nils into non-typed nils
func AsAnySliceCoercingNils ¶
AsAnySliceCoercingNils converts []T into []any, coercing typed nils into non-typed nils
func BoolRefToNullBool ¶
func ByteRefToNullByte ¶
func CoerceIntMap ¶
func CoerceIntMap[TReturn constraints.Integer, TArg constraints.Integer, K comparable](m map[K]TArg) map[K]TReturn
CoerceIntMap interconverts map[T]int types of arbitrary precision
func CoerceIntRef ¶
func CoerceIntRef[TReturn constraints.Integer, TArg constraints.Integer](v *TArg) *TReturn
CoerceIntRef interconverts *int types of arbitrary precision
func CoerceIntSlice ¶
func CoerceIntSlice[TReturn constraints.Integer, TArg constraints.Integer](slice []TArg) []TReturn
CoerceIntSlice interconverts []int types of arbitrary precision
func Float64RefToNullFloat64 ¶
func Float64RefToNullFloat64(p *float64) sql.NullFloat64
func IndirectOr ¶
func IndirectOr[T any](v *T, defaultValue T) T
IndirectOr unwraps a pointer value, falling back to default.
func Int16RefToNullInt16 ¶
func Int32RefToNullInt32 ¶
func Int64RefToNullInt64 ¶
func NullBoolToBoolRef ¶
func NullByteToByteRef ¶
func NullFloat64ToFloat64Ref ¶
func NullFloat64ToFloat64Ref(v sql.NullFloat64) *float64
func NullInt16ToInt16Ref ¶
func NullInt32ToInt32Ref ¶
func NullInt64ToInt64Ref ¶
func NullStringToStringRef ¶
func NullStringToStringRef(v sql.NullString) *string
func StringRefToNullString ¶
func StringRefToNullString(p *string) sql.NullString
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.