mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-07-15 23:00:50 -04:00
03e1b139a8
# Description of Changes Adds `--format` to `spacetime sql`, matching `spacetime logs` with `text` as the default and `json` as the raw API response output. The REPL path passes the selected format through to each query while preserving the existing text output and stats behavior by default. Closes https://github.com/clockworklabs/SpacetimeDB/issues/5450. # API and ABI breaking changes None. # Expected complexity level and risk 1. Small CLI-only output option. Default behavior is unchanged. # Testing - [x] `PATH=/Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin:$PATH /Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin/rustfmt --check crates/cli/src/subcommands/sql.rs crates/cli/src/subcommands/repl.rs` - [x] `git diff --check` - [x] `PATH=/Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin:$PATH /Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin/cargo check -p spacetimedb-cli` - [x] `PATH=/Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin:$PATH /Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin/cargo test -p spacetimedb-cli subcommands::sql::tests:: -- --nocapture` - [x] `PATH=/Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin:$PATH /Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin/cargo run -p spacetimedb-cli -- sql --help` - [x] `PATH=/Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin:$PATH /Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin/cargo ci self-docs --check` Note: `cargo ci self-docs --check` printed the existing warning `argument dotnet is missing help text`. Note: `cargo fmt --all --check` could not be run in this shell because the installed cargo toolchains do not expose `cargo-fmt`; `rustfmt --check` was run directly on the touched Rust files instead. --------- Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>