Repository navigation
Conversation
sdairs
added this pull request to stack #1037
October 1, 2026 17:00
Expose the beta saved-query library endpoints as `cloud saved-query` list/get/create/update/delete. Bodies are built from --name/--new-name, --sql or --sql-file (- for stdin), --database and repeatable --param KEY=VALUE; update is a full replacement. Saved queries can be selected by positional ID or exact --name, resolved across list pages. Includes clap, request-builder and wiremock subprocess coverage, classifier mappings, and a README section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sdairs
force-pushed
the
claude/cli-saved-queries-1029
branch
from
October 1, 2026 17:24
11f6433 to
19defef
Compare
sdairs
removed this pull request from stack #1037
October 1, 2026 17:26
sdairs
added this pull request to stack #1001
October 1, 2026 17:27
This was referenced Oct 1, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1029 (with #1035). Stacked on #1035 → #1028.
Adds
cloud saved-query(Beta) on top of the saved-query library methods from #1028.Commands
list <SERVICE_ID> [--cursor C] [--limit 1..100].--jsonprints{result, limit, totalCount, nextCursor}; human output is a table plusNext cursor: …when there is one.get <SERVICE_ID> <ID | --name NAME>create <SERVICE_ID> --name NAME (--sql SQL | --sql-file PATH|-) --database DB [--param KEY=VALUE]...update <SERVICE_ID> <ID | --name NAME> --new-name NAME (--sql | --sql-file) --database DB [--param KEY=VALUE]...--paramresets the parameters to empty, and the update help says so.--new-namefollows the--new-nameconvention of other update commands, because--nameselects the query to update.delete <SERVICE_ID> <ID | --name NAME>list and get are reads; create, update and delete are writes.
--databaseis required because the spec has no default, and defaulting it would silently reset the database on update.--nameselection pages through the list and fails if no query matches or more than one does. Blank fields, oversized SQL and duplicate--paramkeys are usage errors, caught before any HTTP request.Other changes
src/cloud/saved_queries.rs, wired intocli.rsandmod.rslikequery-api-endpoint.classify-*.pyscripts and their fixtures map the new file (no Cloud suites, likequery_api_endpoints.rs).--nameselector list.Tests
--sql-file ---nameresolution across two pagesGates
cargo fmtand both clippy configurations are clean.cargo test -p clickhousectlpasses except one Docker-only local Postgres test, which fails because Docker isn't running locally. The Python classifier tests pass.🤖 Generated with Claude Code