package named

import "github.com/ydb-platform/ydb-go-sdk/v3/table/result/named"

Index

Types

type Type

type Type uint8
const (
	TypeUnknown Type = iota
	TypeRequired
	TypeOptional
	TypeOptionalWithUseDefault
)

type Value

type Value struct {
	Name  string
	Value interface{}
	Type  Type
}

func Optional

func Optional(columnName string, destination interface{}) Value

Optional makes an object with destination address for column value with name columnName

If column value is NULL, then ScanNamed will write a nil into destination

Warning: value must double-pointed data destination

func OptionalWithDefault

func OptionalWithDefault(columnName string, destinationValueReference interface{}) Value

OptionalWithDefault makes an object with destination address for column value with name columnName

If scanned YDB value is NULL - default type value will be applied to value destination Warning: value must single-pointed data destination

func Required

func Required(columnName string, destinationValueReference interface{}) Value

Required makes an object with destination address for column value with name columnName

Warning: value must single-pointed data destination

Source Files

named.go

Version
v3.93.3
Published
Dec 5, 2024
Platform
linux/amd64
Last checked
3 minutes ago

Tools for package owners.