Documentation
¶
Index ¶
- Variables
- func AssembleJSONObjectWithMarshaledKeys(keys [][]byte, values []string) (string, error)
- func AssembleResolvedJSONObject(columnNames []string, values []string) (string, error)
- func ByteToEscapeSequenceReadable(b byte) string
- func EscapeRune(r rune, isString bool, quote rune) string
- func Float32ToLiteral(v float32) string
- func Float64ToLiteral(v float64) string
- func IsNullGenericColumnValue(gcv spanner.GenericColumnValue) bool
- func MarshalJSONObjectKeys(columnNames []string) ([][]byte, error)
- func Pointers[T any, E ~[]T](e E) iter.Seq[*T]
- func ResolveColumnNames(columnNames []string, namer func(int) string) ([]string, error)
- func ResolveColumnNamesInPlace(names []string, namer func(int) string) ([]string, error)
- func ToAny[T any](seq iter.Seq[T]) iter.Seq[any]
- func ToReadableBytesLiteral(v []byte) string
- func ToStringLiteral(s string) string
Constants ¶
This section is empty.
Variables ¶
var ErrMismatchedJSONObjectFields = errors.New("mismatched JSON object key/value count")
Functions ¶
func AssembleJSONObjectWithMarshaledKeys ¶ added in v0.3.0
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
AssembleResolvedJSONObject combines already-resolved JSON object keys and pre-formatted JSON value strings into a single JSON object string.
func ByteToEscapeSequenceReadable ¶
ByteToEscapeSequenceReadable formats a byte as a string without quote processing
func Float32ToLiteral ¶
func Float64ToLiteral ¶
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
MarshalJSONObjectKeys marshals JSON object keys once for reuse across rows.
func ResolveColumnNames ¶ added in v0.3.0
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
ResolveColumnNamesInPlace resolves unnamed columns in names directly. If namer is nil the input slice is returned unchanged.
func ToReadableBytesLiteral ¶
func ToStringLiteral ¶ added in v0.1.8
Types ¶
This section is empty.