Skip to content

Add opt-in CSV value formatting - #101

Merged
apstndb merged 2 commits into
mainfrom
feat/csv-value-format
Sep 22, 2026
Merged

apstndb merged 2 commits into
mainfrom
feat/csv-value-format

Conversation

@apstndb

@apstndb apstndb commented Sep 22, 2026

Copy link
Copy Markdown
Owner

Add --csv-format=simple|spanner-cli for experimental CSV output. The default remains unchanged; the opt-in format trims NUMERIC trailing zeros and uses bracket-style STRUCT values, including inside arrays.

CSV configuration and writers now live together in csv.go, and streaming reads and committed DML share the same settings. Invalid option combinations fail before opening outputs or creating a client. Existing CSV goldens are unchanged.

Addresses the CSV opt-in portion of #40; does not close that issue or add jq/YAML formatters.

Validation: Go 1.25.13 go build ./..., go test ./... including the Docker emulator, targeted CSV tests, and golangci-lint v2.12.2 all passed. Transport tests cover default/explicit simple/compatible formatting for SELECT and DML, zero rows, redaction, and invalid options.

@apstndb
apstndb merged commit 3228a9e into main Sep 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant