convert

package
v0.0.36-pre2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: MIT Imports: 3 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SQLNullBoolToNil added in v0.0.29

func SQLNullBoolToNil(value sql.NullBool) *bool

Convert sql.NullBool to *bool is valid and to nil is invalid

func SQLNullFloat64ToNil added in v0.0.29

func SQLNullFloat64ToNil(value sql.NullFloat64) *float64

Convert sql.NullFloat64 to *float64 is valid and to nil is invalid

func SQLNullInt16ToNil added in v0.0.29

func SQLNullInt16ToNil(value sql.NullInt16) *int16

Convert sql.NullInt16 to *int16 is valid and to nil is invalid

func SQLNullInt32ToNil added in v0.0.29

func SQLNullInt32ToNil(value sql.NullInt32) *int32

Convert sql.NullInt32 to *int32 is valid and to nil is invalid

func SQLNullInt64ToNil added in v0.0.29

func SQLNullInt64ToNil(value sql.NullInt64) *int64

Convert sql.NullInt64 to *int64 is valid and to nil is invalid

func SQLNullStringToNil added in v0.0.29

func SQLNullStringToNil(value sql.NullString) *string

Convert sql.NullString to *string is valid and to nil is invalid

func SQLNullTimeToNil added in v0.0.29

func SQLNullTimeToNil(value sql.NullTime) *time.Time

Convert sql.NullTime to *time.Time is valid and to nil is invalid

func ToPointer

func ToPointer[T any](value T) *T

Convert value to pointer of data type

func ToSafeValue

func ToSafeValue[T any](value any) T

Convert any value to `T` data type and if value is not valid or `nil`, will use default value of `T` (null/nil safety) as return value

Types

This section is empty.

Jump to

Keyboard shortcuts

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