scan

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToUniformType

func ConvertToUniformType(val any) any

Tries to convert val to an expected type.

For example, all ints will be converted to int64 The same logic goes for uint, float and complex respectively.

func RScan

func RScan(dstPtr reflect.Value, src any, flags ScanFlag) (wasSet bool, err error)

func Scan

func Scan[DST any](dstPtr *DST, src any, flags ScanFlag) (wasSet bool, err error)

Types

type ScanFlag

type ScanFlag = bitcheck.Flag
const (
	SF_NONE        ScanFlag = 0
	SF_SQL_SCANNER ScanFlag = 1 << iota
	SF_STRCONV
	SF_REFLECTCONV

	SF_CONVS   = SF_STRCONV | SF_REFLECTCONV
	SF_DEFAULT = SF_SQL_SCANNER | SF_STRCONV | SF_REFLECTCONV
)

Jump to

Keyboard shortcuts

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