Skip to content

Releases: apstndb/structfields

v0.1.1

Choose a tag to compare

@apstndb apstndb released this 10 Jun 15:48
390a140

Documentation and repository-structure release for the root fields module; the ported fields code is unchanged from v0.1.0.

Changed

  • The spannertag package (added on main after v0.1.0, never in a root-module release) is now a separate nested module github.com/apstndb/structfields/spannertag, tagged independently as spannertag/vX.Y.Z — it tracks cloud.google.com/go/spanner releases while this root module tracks cloud.google.com/go. See spannertag/v0.1.0.
  • README: note that the fields port (tracking cloud.google.com/go v0.121.4) is verified identical through v0.123.0.
  • Add AGENTS.md documenting the fork-export policy; mise tasks now run in both modules.

v0.1.0

Choose a tag to compare

@apstndb apstndb released this 10 Jun 14:42
2f9fe4a

Initial release.

Exported fork of cloud.google.com/go/internal/fields as of cloud.google.com/go v0.121.4, the struct field-listing implementation shared by the spanner, bigquery, datastore, and firestore client libraries (embedded-field flattening with Go's shadowing rules, tag dominance, case-insensitive matching).

  • Package name stays fields; diffs against upstream are minimal (provenance headers, a local cmp.Equal shim replacing internal/testutil in tests).
  • The sole purpose of this module is to fork and export that internal package; behavioral mirrors built on top (such as spanenc) live in their own modules.
  • License: Apache-2.0 (upstream Copyright Google LLC).

spannertag/v0.1.0

Choose a tag to compare

@apstndb apstndb released this 10 Jun 15:49
390a140

Initial release of the nested module github.com/apstndb/structfields/spannertag.

Port of the Cloud Spanner Go client's unexported spannerTag / spannerTagParser / fieldCache (value.go, as of cloud.google.com/go/spanner v1.91.0) exported as Tag / Parser / Cache, including the read-only column tag support introduced in v1.86.0 (googleapis/google-cloud-go#12895):

  • spanner:"-" drops the field; spanner:"->" marks it read-only keeping the Go field name.
  • Tags split on ; with the column name first; -> or case-insensitive readonly parts mark the field read-only, surfaced as Tag.ReadOnly via fields.Field.ParsedTag.
  • Cache is the exported counterpart of the client's fieldCache, built on the root fields module.

This module versions independently of the root fields module because it tracks cloud.google.com/go/spanner releases. License: Apache-2.0 (upstream Copyright Google LLC).