Final feature release of spanenc. Development moved to spancodec, which merges spanenc and spandec into a single codec module (see its v0.1.0 release and migration table). spanenc v0.3.x remains usable but frozen; the module carries a Deprecated: notice as of this release.
Added since v0.3.1
RowEncoder.MustResultSetMetadata(#3):ResultSetMetadatapanicking on error, for package-level wiring next toMustNewRowEncoder— row-type resolution is deterministic perTand column mask, and Must construction alone does not guarantee an inferable row type. Surveyed from apstndb/spanner-mycli#661.- Custom value encoders (#5 phase 1):
WithValueEncoder[T]registers a per-call encoder for Go types outside the client's coverage (uint32 and other integer width variants,time.Duration, external types that cannot implementspanner.Encoder), consulted before the client mirror; the newErrFallthroughdefers to the built-in encoding. Registrations apply per element of[]T;WithGoType[T]supplies the ARRAY element type for nil/empty slices and forValuesFromSlice/ArrayValueFromSlicestatic inference. Exact-type matching only; no package-global registry. Hazard (documented and pinned by test): registeringtime.Timebypasses thespanner.CommitTimestampsentinel.
#5 phase 2 (construction-time registrations informing RowEncoder.RowType, options on TypeFor/RowTypeFor) ships in spancodec v0.1.0, not here.
Requirements
github.com/apstndb/spanvaluev0.7.3+.cloud.google.com/go/spanner: v1.84.1 MVS floor; mirrored semantics track v1.91.0.