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.
Click to show internal directories.
Click to hide internal directories.