Skip to content

Run arbitraty sql APP-7351#8

Merged
ivpusic merged 1 commit into
executionsfrom
run_sql
Mar 3, 2026
Merged

Run arbitraty sql APP-7351#8
ivpusic merged 1 commit into
executionsfrom
run_sql

Conversation

@ivpusic
Copy link
Copy Markdown
Member

@ivpusic ivpusic commented Mar 2, 2026

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

Copy link
Copy Markdown
Member Author

ivpusic commented Mar 2, 2026

@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.

This was referenced Mar 2, 2026
@ivpusic ivpusic changed the title Run arbitraty sql Run arbitraty sql APP-7351 Mar 3, 2026
@linear
Copy link
Copy Markdown

linear Bot commented Mar 3, 2026

APP-7351 Step 10: `dune query run-sql`

cmd/query/run_sql.go — flags: --sql (required), --name (optional), --performance, --limit, --param key=value, -o.

Calls SQLExecute(sql, performance) → polls results using shared helper from step 8.

Acceptance criteria:

  • dune query run-sql --sql "SELECT 1" executes and prints results
  • --performance large passed to API
  • --limit limits rows
  • Missing --sql errors
  • SQL syntax error prints error with hint
  • Progress shown on stderr

Tests:

  • Successful execution and display (mock API)
  • Missing --sql flag errors
  • Performance flag passed
  • SQL error prints details
  • Uses shared polling logic (no duplication with run)

@ivpusic ivpusic marked this pull request as ready for review March 3, 2026 08:49
@cursor
Copy link
Copy Markdown

cursor Bot commented Mar 3, 2026

PR Summary

Medium Risk
Adds a new CLI path that submits arbitrary SQL to the API and optionally waits for results; while mostly additive, it touches execution/wait/display plumbing shared with existing query run behavior.

Overview
Adds dune query run-sql to execute raw SQL (with --sql, optional --param, --performance, --limit, and --no-wait) and either print an execution handle or wait and render results.

Refactors shared execution helpers by extracting parsePerformance, displayExecuteResponse, and waitAndDisplay, and reuses them from both query run and the new SQL command; extends test mocks and adds comprehensive tests covering success, JSON/text output, limits, params, and error cases.

Written by Cursor Bugbot for commit 7585ef9. Configure here.

@ivpusic ivpusic merged commit fcdf65f into executions Mar 3, 2026
1 check 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