Help us shape the future of Go! Take the 2026 Go Developer Survey

nullable

package
v2.17.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package nullable converts between Go values and the database/sql Null types.

It imports nothing outside the standard library, which is the reason it is a package of its own: filtering needs these conversions, and observability/tracing imports filtering, so reaching them through database made every instrumented package in the module depend on database. The same functions remain in database, delegating here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolFromNullBool

func BoolFromNullBool(b sql.NullBool) bool

func Float32FromNullString

func Float32FromNullString(s sql.NullString) float32

func Float32FromString

func Float32FromString(s string) float32

func Float32PointerFromNullString

func Float32PointerFromNullString(f sql.NullString) *float32

func Float64PointerFromNullString

func Float64PointerFromNullString(f sql.NullString) *float64

func Int32PointerFromNullInt32

func Int32PointerFromNullInt32(i sql.NullInt32) *int32

func NullBoolFromBool

func NullBoolFromBool(b bool) sql.NullBool

func NullBoolFromBoolPointer

func NullBoolFromBoolPointer(b *bool) sql.NullBool

func NullInt32FromInt32Pointer

func NullInt32FromInt32Pointer(i *int32) sql.NullInt32

func NullInt32FromUint8Pointer

func NullInt32FromUint8Pointer(i *uint8) sql.NullInt32

func NullInt32FromUint16

func NullInt32FromUint16(i uint16) sql.NullInt32

func NullInt32FromUint16Pointer

func NullInt32FromUint16Pointer(i *uint16) sql.NullInt32

func NullInt32FromUint32Pointer

func NullInt32FromUint32Pointer(i *uint32) sql.NullInt32

func NullInt64FromUint32Pointer

func NullInt64FromUint32Pointer(f *uint32) sql.NullInt64

func NullStringFromFloat32

func NullStringFromFloat32(f float32) sql.NullString

func NullStringFromFloat32Pointer

func NullStringFromFloat32Pointer(f *float32) sql.NullString

func NullStringFromFloat64Pointer

func NullStringFromFloat64Pointer(f *float64) sql.NullString

func NullStringFromString

func NullStringFromString(s string) sql.NullString

func NullStringFromStringPointer

func NullStringFromStringPointer(s *string) sql.NullString

func NullTimeFromTime

func NullTimeFromTime(t time.Time) sql.NullTime

func NullTimeFromTimePointer

func NullTimeFromTimePointer(t *time.Time) sql.NullTime

func StringFromFloat32

func StringFromFloat32(f float32) string

func StringFromFloat64

func StringFromFloat64(f float64) string

func StringFromNullString

func StringFromNullString(nt sql.NullString) string

func StringPointerFromNullString

func StringPointerFromNullString(nt sql.NullString) *string

func TimeFromNullTime

func TimeFromNullTime(nt sql.NullTime) time.Time

func TimePointerFromNullTime

func TimePointerFromNullTime(nt sql.NullTime) *time.Time

func Uint16PointerFromNullInt32

func Uint16PointerFromNullInt32(f sql.NullInt32) *uint16

func Uint32PointerFromNullInt32

func Uint32PointerFromNullInt32(f sql.NullInt32) *uint32

func Uint32PointerFromNullInt64

func Uint32PointerFromNullInt64(f sql.NullInt64) *uint32

Types

This section is empty.

Jump to

Keyboard shortcuts

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