internal

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMismatchedJSONObjectFields = errors.New("mismatched JSON object key/value count")

Functions

func AssembleJSONObjectWithMarshaledKeys added in v0.3.0

func AssembleJSONObjectWithMarshaledKeys(keys [][]byte, values []string) (string, error)

AssembleJSONObjectWithMarshaledKeys combines pre-marshaled JSON object keys and pre-formatted JSON value strings into a single JSON object string.

func AssembleResolvedJSONObject added in v0.3.0

func AssembleResolvedJSONObject(columnNames []string, values []string) (string, error)

AssembleResolvedJSONObject combines already-resolved JSON object keys and pre-formatted JSON value strings into a single JSON object string.

func ByteToEscapeSequenceReadable

func ByteToEscapeSequenceReadable(b byte) string

ByteToEscapeSequenceReadable formats a byte as a string without quote processing

func EscapeRune added in v0.1.8

func EscapeRune(r rune, isString bool, quote rune) string

func Float32ToLiteral

func Float32ToLiteral(v float32) string

func Float64ToLiteral

func Float64ToLiteral(v float64) string

func IsNullGenericColumnValue added in v0.3.0

func IsNullGenericColumnValue(gcv spanner.GenericColumnValue) bool

IsNullGenericColumnValue reports whether gcv represents SQL NULL. A nil gcv.Value is treated as NULL.

func MarshalJSONObjectKeys added in v0.3.0

func MarshalJSONObjectKeys(columnNames []string) ([][]byte, error)

MarshalJSONObjectKeys marshals JSON object keys once for reuse across rows.

func Pointers

func Pointers[T any, E ~[]T](e E) iter.Seq[*T]

func ResolveColumnNames added in v0.3.0

func ResolveColumnNames(columnNames []string, namer func(int) string) ([]string, error)

ResolveColumnNames returns a copy of columnNames with every empty string replaced by a name produced by namer. Already-named columns are preserved. If namer is nil the input slice is returned unchanged without copying.

func ResolveColumnNamesInPlace added in v0.3.0

func ResolveColumnNamesInPlace(names []string, namer func(int) string) ([]string, error)

ResolveColumnNamesInPlace resolves unnamed columns in names directly. If namer is nil the input slice is returned unchanged.

func ToAny

func ToAny[T any](seq iter.Seq[T]) iter.Seq[any]

func ToReadableBytesLiteral

func ToReadableBytesLiteral(v []byte) string

func ToStringLiteral added in v0.1.8

func ToStringLiteral(s string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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