v0.2.0
Tracks the read-only struct tag feature from cloud.google.com/go/spanner and restructures the tag parser. Mirrored semantics now track spanner v1.91.0; the go.mod requirement intentionally stays at the v1.84.1 MVS floor (see "Dependency policy" below).
Added
- Read-only column tags (
spanner:"->",spanner:"Name;readonly",spanner:"Name;->"; case-insensitivereadonly), mirroring spanner v1.86.0 (googleapis/google-cloud-go#12895):- Tags now split on
;with the column name first (a tag likespanner:"Name;readonly"previously yielded the literal column nameName;readonly). - Read-shaped listings (
StructColumns,RowTypeFor,StructColumnsAndValues) include read-only fields, because they are readable viaToStruct. - Write-shaped helpers (
MutationColumnsAndValues,MutationMap) exclude them, mirroringstructToMutationParams. - STRUCT-typed values (
ValueOfon a struct,TypeFor) keep the client's raw-tag quirk: tag options leak verbatim into STRUCT field names.
- Tags now split on
- CI:
latest-depsjob tests againstcloud.google.com/go/spanner@latestto catch upstream drift early.
Changed
- The
spannertag parser is no longer local: it comes from the newgithub.com/apstndb/structfields/spannertagnested module (Apache-2.0 port of the client's unexportedspannerTag/spannerTagParser/fieldCache), preserving the invariant that upstream-derived code never lives in this MIT module. - Dependencies are now all tagged releases:
spanvaluev0.7.1 (gcvctor UTC-timestamp wire format; replaces the v0.1.x pseudo-version pin),structfieldsv0.1.0,structfields/spannertagv0.1.0.
Dependency policy
The mirrored-semantics version (v1.91.0) is independent of the go.mod requirement: go.mod declares only the minimum client version whose APIs this module uses (currently the v1.84.1 floor inherited from spanvalue), so downstream modules keep control of the spanner client version under MVS.