Skip to content

v0.2.0

Choose a tag to compare

@apstndb apstndb released this 10 Jun 16:08
de28363

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-insensitive readonly), mirroring spanner v1.86.0 (googleapis/google-cloud-go#12895):
    • Tags now split on ; with the column name first (a tag like spanner:"Name;readonly" previously yielded the literal column name Name;readonly).
    • Read-shaped listings (StructColumns, RowTypeFor, StructColumnsAndValues) include read-only fields, because they are readable via ToStruct.
    • Write-shaped helpers (MutationColumnsAndValues, MutationMap) exclude them, mirroring structToMutationParams.
    • STRUCT-typed values (ValueOf on a struct, TypeFor) keep the client's raw-tag quirk: tag options leak verbatim into STRUCT field names.
  • CI: latest-deps job tests against cloud.google.com/go/spanner@latest to catch upstream drift early.

Changed

  • The spanner tag parser is no longer local: it comes from the new github.com/apstndb/structfields/spannertag nested module (Apache-2.0 port of the client's unexported spannerTag / spannerTagParser / fieldCache), preserving the invariant that upstream-derived code never lives in this MIT module.
  • Dependencies are now all tagged releases: spanvalue v0.7.1 (gcvctor UTC-timestamp wire format; replaces the v0.1.x pseudo-version pin), structfields v0.1.0, structfields/spannertag v0.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.