usql

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNull

func NewNull[T any](v T) sql.Null[T]

func NullBool

func NullBool(v bool) sql.NullBool

NullBool constructs an sql.NullBool from a regular bool. The Valid field is always set to true as a non-null bool is being provided.

func NullFloat64

func NullFloat64(v float64) sql.NullFloat64

NullFloat64 constructs an sql.NullFloat64 from a regular float64. It sets the Valid field to true if the provided float64 is not NaN (Not-a-Number).

func NullString

func NullString(v string) sql.NullString

NullString constructs a sql.NullString from a regular string. It sets the Valid field to true if the provided string is not empty.

func NullTime

func NullTime(v time.Time) sql.NullTime

NullTime constructs an sql.NullTime from a regular time.Time. It sets the Valid field to true if the provided time is not the zero time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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