Skip to content

v0.7.4

Choose a tag to compare

@apstndb apstndb released this 11 Jun 04:49
cc78475

Patch release since v0.7.3. Additive writer APIs for rows that do not come from a *spanner.RowIterator, plus documentation. No compile-time API removals, signature changes, or runtime behavior changes to existing APIs. Minimum Go remains 1.24.


Highlights

writer: RunRowSeq / WriteRowSeq for rows without a RowIterator (#238)

  • RunRowSeq and WriteRowSeq drive RowIteratorHooks / RowIteratorWriter sinks from client-side (virtual) result sets: explicit *sppb.ResultSetMetadata plus a fallible row sequence (iter.Seq2[*spanner.Row, error]).
  • The hook contract is identical to RunRowIterator by construction (shared internal loop): PrepareMetadata runs once before the first data row including for an empty sequence (header-only delimited output), a yielded error aborts without Finish, RowsRead counts successful writes, Stats stays zero.
  • RowSeq adapts pre-built rows to the sequence shape. New ErrNilRowSeq; a (nil, nil) pair yielded by a sequence is rejected at the boundary with ErrNilRow.
  • Pairs with lazy per-row encoders that can fail — designed against spanenc RowEncoder.Rows (apstndb/spanenc#2), surveyed from spanner-mycli SHOW/HELP virtual result sets (apstndb/spanner-mycli#657).

Documentation

  • ExampleWriteRowSeq (runnable, pkg.go.dev), writer godoc # RowIterator section, and writer/README.md goal-table row for in-memory / virtual rows.

Upgrading to v0.7.4

From v0.7.3

Compile-time: additive APIs only (RunRowSeq, WriteRowSeq, RowSeq, ErrNilRowSeq).

Runtime: no behavior changes to existing APIs.


Full changelog

v0.7.3...v0.7.4