Releases: apstndb/spanner-mycli
v0.26.0
What's Changed
New Features
-
feat: display query advisor index recommendations after EXPLAIN/EXPLAIN ANALYZE by @apstndb in #490
After running
EXPLAIN ANALYZE, index recommendations from Spanner Query Advisor are displayed with estimated improvement:Query Advisor Recommendations: CREATE INDEX VenuesIdx1 ON Venues(OutdoorVenue, Capacity) STORING (VenueName); -- Est. improvement: 95.55%
Misc
- Bump spanemuboost to v0.2.15 by @apstndb in #477
- Updates default Cloud Spanner Emulator to 1.5.45
- Bump spanner client library v1.87.0 by @apstndb in #478
- Bump spanemuboost to v0.2.17 by @apstndb in #479
- Updates default Cloud Spanner Emulator to 1.5.50
Full Changelog: v0.25.0...v0.26.0
v0.25.0
What's Changed
New Features
Misc
- fix: use official SQL syntax from Spanner documentation for singers sample by @apstndb in #475
- build(deps): bump github.com/apstndb/spanemuboost from v0.2.12 to v0.2.13 by @apstndb in #476
Full Changelog: v0.24.0...v0.25.0
v0.24.0
What's Changed
Since this version, Go 1.25 is required to build spanner-mycli. If you want to use it without installing new Go compiler, you can use pre-built binary of spanner-mycli.
Initialize emulator with the sample database
spanner-mycli now supports the official sample databases.
$ spanner-mycli --list-samples
Available sample databases:
banking GoogleSQL Banking application with accounts and transactions
finance GoogleSQL Finance application schema (GoogleSQL)
finance-graph GoogleSQL Finance application with graph features
finance-pg PostgreSQL Finance application (PostgreSQL dialect)
gaming GoogleSQL Gaming application with players and scores
Usage: spanner-mycli --embedded-emulator --sample-database=<name>
$ spanner-mycli --embedded-emulator --sample-database=banking -v
Connected.
spanner> SHOW TABLES;
+-----------------------------+
| Tables_in_emulator-database |
+-----------------------------+
| Customers |
| Accounts |
| TransactionLedger |
+-----------------------------+
3 rows in set (0.03 sec)
Bug Fixes
- fix: clear environment variables in TestMain for test isolation by @apstndb in #462
- fix: exclude generated columns from DUMP INSERT statements by @apstndb in #469
New Features
- feat: adopt native UUID and INTERVAL support from spanvalue v0.1.8 by @apstndb in #463
- feat: relax SELECT constraint to allow simple column names in auto-detection by @apstndb in #468
- feat: add --sample-database flag for initializing embedded emulator with official samples by @apstndb in #472
Misc
- build: Update Go version from 1.24 to 1.25 by @apstndb in #452
- feat: adopt Go 1.25 specific features by @apstndb in #453
- refactor: reorganize integration_test.go into logical test groups by @apstndb in #457
- refactor: reorganize system_variables_test.go for better maintainability by @apstndb in #458
- refactor: reorganize main_flags_test.go for better maintainability (#455) by @apstndb in #459
- test: improve test quality with focused helper functions and better readability by @apstndb in #460
- feat: update modelcontextprotocol/go-sdk from v0.2.0 to v0.3.0 by @apstndb in #464
- build: update dependencies following Go 1.25 and MCP SDK v0.3.0 migration by @apstndb in #465
- test: refactor TestParameterStatements to use data-driven approach by @apstndb in #466
Full Changelog: v0.23.0...v0.24.0
v0.23.0
What's Changed
New Features
- feat: add SQL export formats for database migration by @apstndb in #430
- feat: add --quiet flag to suppress result lines by @apstndb in #433
- feat: implement DUMP statements for database export by @apstndb in #434
- feat: add output redirect command (\o) and --output flag for file-only output by @apstndb in #437
- feat: implement table dependency resolver for INTERLEAVE and FK relationships by @apstndb in #439
- feat: implement automatic table name detection for SQL export formats by @apstndb in #440
Misc
- refactor: implement withTransactionContextLocked pattern for improved transaction management by @apstndb in #442
- Remove panic calls and implement proper error handling by @apstndb in #447
- refactor: precompile frequently used regex patterns by @apstndb in #449
- refactor: unify 11 formatters under common pattern with minimal abstraction by @apstndb in #448
- Optimize test suite by sharing emulator with instance-level isolation by @apstndb in #450
- test: complete test parallelization for improved performance by @apstndb in #451
Full Changelog: v0.22.1...v0.23.0
v0.22.1
v0.22.0
What's Changed
This release introduces significant performance improvements, including streaming output support that reduces memory usage when handling large datasets.
Streaming Output Support:
Streaming output is now enabled by default for all formats except TABLE. If you wish to enable streaming output in all modes—including TABLE format—you can set it explicitly with:
spanner-mycli --streaming=TRUE
or by adding CLI_STREAMING=TRUE to your config file (.spanner_mycli.cnf).
Default Table Format:
Table format is now the default for both interactive and batch modes. You no longer need to specify --table or -t for each invocation.
Note:
If your scripts rely on the TAB-formatted output in batch mode, you will need to update them accordingly. To retain the previous TAB format behavior, you can either:
- Set the format explicitly:
spanner-mycli --set CLI_FORMAT=TAB - Add the following to your config file (
.spanner_mycli.cnf):CLI_FORMAT=TAB
Breaking Changes
Bug Fixes
- fix: add mutex protection for transaction context access by @apstndb in #396
- fix: use TableHeader presence instead of IsMutation for output formatting by @apstndb in #416
- fix: update enumer calls to use Go 1.24 tool management by @apstndb in #423
New Features
- feat: add generics-based validation and parsing framework for system variables by @apstndb in #409
- feat: implement streaming output to reduce memory usage and improve TTFB by @apstndb in #413
Full Changelog: v0.21.0...v0.22.0
v0.21.0
This release includes many meta-commands and command-line options to improve compatibility with the Official Spanner CLI.
What's Changed
New Features
- feat: add --source as an alias for --file flag by @apstndb in #376
- feat: add --deployment_endpoint as alias for --endpoint by @apstndb in #377
- feat: implement \! meta-command for shell command execution by @apstndb in #375
- feat: implement --host and --port flags as first-class options by @apstndb in #379
- feat: implement \. meta-command for executing SQL from file by @apstndb in #378
- feat: implement \u meta-command for database switching by @apstndb in #381
- feat: implement --skip-column-names option by @apstndb in #382
- feat: implement \R meta-command for prompt change by @apstndb in #383
- feat: implement --tee option for output logging (#352) by @apstndb in #384
- feat: implement --system-command option for controlling system commands by @apstndb in #386
- feat: implement --html and --xml output format options (#350) by @apstndb in #387
- feat: implement \T and \t meta-commands for output file control by @apstndb in #385
- feat: add session-init-only variables validation mechanism by @apstndb in #389
- feat: apply go fmt to entire codebase and add CI enforcement by @apstndb in #391
- feat: add CSV output format support with multiple CLI options by @apstndb in #393
Full Changelog: v0.20.0...v0.21.0
v0.20.0
What's Changed
Bug Fixes
- fix: handle non-TTY stdin correctly to avoid permission denied error by @apstndb in #327
- fix: resolve flag inconsistencies discovered during flag testing by @apstndb in #372
New Features
- feat: implement RETURN_COMMIT_STATS setter (SET variable) by @apstndb in #313
- feat: implement --try-partition-query flag for standard GoogleSQL partition testing by @apstndb in #317
- Implement async DDL execution functionality (#277) by @apstndb in #316
- feat: migrate from mcp-go to official modelcontextprotocol/go-sdk by @apstndb in #361
- Add --emulator-platform flag and CLI_EMULATOR_PLATFORM variable by @apstndb in #374
Misc
- fix: replace context.TODO() with t.Context() in integration tests by @apstndb in #315
- feat: add comprehensive tests for parseTimestampBound function by @apstndb in #325
- test: add comprehensive error handling tests for system_variables by @apstndb in #340
- test: add tests for readline highlight functions by @apstndb in #365
- [Test Coverage] Complete tests for proto descriptor file handling by @apstndb in #363
- refactor: improve readline history testability by @apstndb in #366
- feat: improve test coverage infrastructure by @apstndb in #368
- [Test Coverage] Refactor readline input validation for testability by @apstndb in #367
- test: add comprehensive flag validation tests by @apstndb in #369
Full Changelog: v0.19.0...v0.20.0
v0.19.0
This release introduces vibe coding powered by Claude Code, significantly accelerating our response to issues. It includes many new features and fixes numerous bugs, such as:
- Completely new features like MCP server mode, detached mode (which allows admin operations without requiring a connection to a database), and the
SHOW OPERATIONclient-side statement, which enables you to wait for or check the details of long-running operations by specifying their IDs. - Improved compatibility with gcloud commands and the java-spanner Connection API.
- Screen width control.
What's Changed
Breaking Changes
New Features
- feat: Terminal properties by @apstndb in #236
CLI_CURRENT_WIDTHCLI_FIXED_WIDTH
- feat: MCP server by @apstndb in #237
- Support database-less session mode (#256) by @apstndb in #259
- Enhance CREATE DATABASE workflow for database-less mode by @apstndb in #260
- feat: implement optional --database flag with detach/attach functionality (fixes #258) by @apstndb in #263
- feat: expose CLI prefix system variables for consistency by @apstndb in #273
- feat: add --timeout flag for gcloud compatibility by @apstndb in #286
- feat: add SHOW OPERATION statement to attach to specific LRO by @apstndb in #298
- feat: implement SHOW OPERATION SYNC with progress bar monitoring by @apstndb in #302
- feat: implement RETURN_COMMIT_STATS getter for SHOW VARIABLE command by @apstndb in #311
Bug Fixes
- Fix incorrect error check in rollback handling by @apstndb in #254
- fix: add nil checks for transaction accessor methods by @apstndb in #267
- fix: prevent resource leak in batch transaction cleanup by @apstndb in #268
- fix: replace panic with proper error handling in library code by @apstndb in #269
- Handle ignored errors throughout the codebase by @apstndb in #270
- Fix unintended changes in --help output and README.md inconsistencies by @apstndb in #296
Misc
- Document detached mode features and refactor terminology by @apstndb in #264
- fix: remove outdated FIXME comment about ElapsedTime in batch mode by @apstndb in #266
- Fix staticcheck linter warnings by @apstndb in #274
- refactor: remove config value display workaround in help text by @apstndb in #275
Full Changelog: v0.18.0...v0.19.0
v0.18.0
This PR enhances features to investigate query plans without additional query execution.
What's Changed
New Features
- feat: Support inline stats by @apstndb in #231
- feat: Implement EXPLAIN [ANALYZE] LAST QUERY by @apstndb in #233
- feat: Implement SHOW PLAN NODE by @apstndb in #234
Misc
Full Changelog: v0.17.0...v0.18.0