spannerutil

package
v1.104.5 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntValueDecoder

type IntValueDecoder[T inty] struct {
	// contains filtered or unexported fields
}

IntValueDecoder is a type wrapping an int pointer so it can decode integer values from Spanner directly (Spanner prefers to work only in int64s).

func Int

func Int[T inty](val *T) IntValueDecoder[T]

Int wraps a pointer to an int-based type in a type that can be decoded directly from Spanner.

In general, it is preferable to add EncodeSpanner/DecodeSpanner methods to our specialized int types, but this can be used for types we don't own or otherwise can't put methods on.

func (IntValueDecoder[T]) DecodeSpanner

func (s IntValueDecoder[T]) DecodeSpanner(input any) error

DecodeSpanner decodes a value from a Spanner-stored type to the appropriate int type. It implements spanner.Decoder.

Jump to

Keyboard shortcuts

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