v0.7.1
Patch release since v0.7.0. Correctness fixes for gcvctor wire strings, SQL INSERT zero-column writes, Spanner CLI / Literal float formatting, and ENUM CAST validation. Documentation-only updates for godoc accuracy and Gemini review styleguide. No compile-time API removals or signature changes. Minimum Go remains 1.24.
Highlights
gcvctor wire string correctness (#225)
TimestampValuenormalizes to UTC Zulu wire strings (matches Spanner client andTimestampStringValue).JSONValueandPGJSONBValuemarshal without HTML character escaping, matching Spanner-emitted JSON wire for fixtures.dbsqlrows/gospannerrequire bumped tospanvalue v0.7.0(nested module metadata only).
SQL INSERT zero-column guard (#226)
SQLInsertWriterWriteValues/WriteRownow returnErrMissingColumnNamesfor a registered empty row type, matchingWriteGCVsand preventing invalidINSERT INTO t () VALUES ();output.
Float and ENUM literal formatting (#228 / #206)
- Literal preset: finite integral FLOAT64 values append
.0when the shorteststrconvform would lex as INT64 (e.g.1.0not1). - Spanner CLI preset: integral finite floats omit the fractional part (
1not1.000000); non-integral values keep six decimal places (matches spanner-cli). FormatEnumAsCastvalidates ENUM wire payloads withParseIntbefore emittingCAST(... AS ...)SQL.
Documentation (#227, #229)
- Godoc accuracy sweep for
writer,gcvctor, anddbsqlrows(no behavior change). - Gemini styleguide: clarify
[Type.Method]vs[*Type.Method]doc links.
Upgrading to v0.7.1
From v0.7.0
Compile-time: no signature removals or renames. Additive test coverage only.
Runtime behavior changes (review if you use these patterns or assert golden strings):
| Area | v0.7.0 | v0.7.1 |
|---|---|---|
gcvctor.TimestampValue with non-UTC time.Time |
Local offset in wire string | UTC Zulu wire (#225) |
gcvctor.JSONValue / PGJSONBValue with <, >, & in JSON |
HTML-escaped wire (\u003c etc.) |
Unescaped wire matching Spanner (#225) |
SQLInsertWriter write after zero-column PrepareRowType |
Could emit invalid INSERT ... () VALUES () |
ErrMissingColumnNames (#226) |
Literal preset integral FLOAT64 (e.g. 1.0) |
Shortest form without .0 |
1.0 when needed to avoid INT64 lex (#228) |
| Spanner CLI preset integral floats | 1.000000 |
1 (#228) |
ENUM CAST with non-integer wire string |
Could emit invalid SQL | Parse error (#228) |
Preset-backed Simple export and typical CSV/JSONL paths are unaffected. Re-golden Literal, Spanner CLI, or hand-built gcvctor fixture tests if you assert the rows above.