Skip to content

Update query command APP-7347#4

Merged
ivpusic merged 1 commit into
get_queryfrom
update_query
Mar 3, 2026
Merged

Update query command APP-7347#4
ivpusic merged 1 commit into
get_queryfrom
update_query

Conversation

@ivpusic
Copy link
Copy Markdown
Member

@ivpusic ivpusic commented Mar 2, 2026

dune query update 4125432 --sql "SELECT * FROM ethereum.transactions LIMIT 10"

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 2, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Member Author

ivpusic commented Mar 2, 2026

@ivpusic ivpusic changed the title Query update CLI option Update query command APP-7347 Mar 3, 2026
@linear
Copy link
Copy Markdown

linear Bot commented Mar 3, 2026

APP-7347 Step 6: `dune query update`

cmd/query/update.go — positional arg: query ID. Flags: --name, --sql, --description, --private — all optional but at least one required. Only sends provided fields (pointer/omitempty pattern).

Output: text: Updated query 4125432 / json: {"query_id": 4125432}

Acceptance criteria:

  • Single flag update sends only that field
  • Multiple flags all included
  • No flags prints error
  • API errors (404, 409) printed clearly

Tests:

  • Single flag → only that field in PATCH body
  • Multiple flags all present
  • No flags → usage error
  • 404 handled

@ivpusic ivpusic requested a review from va3093 March 3, 2026 08:42
@ivpusic ivpusic marked this pull request as ready for review March 3, 2026 08:43
@cursor
Copy link
Copy Markdown

cursor Bot commented Mar 3, 2026

PR Summary

Low Risk
Adds a new CLI command and request construction logic with straightforward validation and comprehensive unit tests; no auth/security or data-store behavior is modified.

Overview
Adds a new dune query update <query-id> subcommand that updates an existing saved query’s fields (--name, --sql, --description, --private, --tags) and supports -o json output.

The command validates the query ID, requires at least one provided flag, builds a partial UpdateQueryRequest using only changed flags, and calls UpdateQuery; tests extend the mock client and cover single/multi-flag updates, boolean handling, error cases, and JSON output.

Written by Cursor Bugbot for commit c6b1e8f. Configure here.

@ivpusic ivpusic merged commit 179ba6b into get_query Mar 3, 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.

2 participants