Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ Manage and execute Dune queries.
| `query get <query-id>` | Get a saved query's details and SQL |
| `query update <query-id> [--name] [--sql] [--description] [--private] [--tags]` | Update an existing query |
| `query archive <query-id>` | Archive a saved query |
| `query run <query-id> [--param key=value] [--performance medium\|large] [--limit] [--timeout] [--no-wait]` | Execute a saved query and display results |
| `query run-sql --sql <sql> [--param key=value] [--performance medium\|large] [--limit] [--timeout] [--no-wait]` | Execute raw SQL directly |
| `query run <query-id> [--param key=value] [--performance small\|medium\|large] [--limit] [--timeout] [--no-wait]` | Execute a saved query and display results |
| `query run-sql --sql <sql> [--param key=value] [--performance small\|medium\|large] [--limit] [--timeout] [--no-wait]` | Execute raw SQL directly |

### `dune execution`

Expand Down
7 changes: 5 additions & 2 deletions cmd/query/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ func parseQueryID(arg string) (int, error) {

func parsePerformance(cmd *cobra.Command) (string, error) {
performance, _ := cmd.Flags().GetString("performance")
if performance != "medium" && performance != "large" {
return "", fmt.Errorf("invalid performance tier %q: must be \"medium\" or \"large\"", performance)
if performance != "small" && performance != "medium" && performance != "large" {
return "", fmt.Errorf(
"invalid performance tier %q: must be \"small\", \"medium\" or \"large\"",
performance,
)
}
return performance, nil
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/query/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func newRunCmd() *cobra.Command {
}

cmd.Flags().StringArray("param", nil, "typed query parameter in key=value format (repeatable); supported types: text, number (stringified, e.g. '30'), datetime (YYYY-MM-DD HH:mm:ss), enum")
cmd.Flags().String("performance", "medium", `engine size for the execution: "medium" (default) or "large"; credits are consumed based on actual compute resources used`)
cmd.Flags().String("performance", "medium", `engine size for the execution: "small", "medium" (default) or "large"; credits are consumed based on actual compute resources used`)
cmd.Flags().Int("limit", 0, "maximum number of result rows to return (0 = all available rows)")
cmd.Flags().Bool("no-wait", false, "submit the execution and exit immediately, printing only the execution ID and state")
cmd.Flags().Int("timeout", 300, "maximum seconds to wait for the execution to complete before timing out")
Expand Down
2 changes: 1 addition & 1 deletion cmd/query/run_sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func newRunSQLCmd() *cobra.Command {
cmd.Flags().String("sql", "", "the SQL query text in DuneSQL dialect (required)")
_ = cmd.MarkFlagRequired("sql")
cmd.Flags().StringArray("param", nil, "typed query parameter in key=value format (repeatable); supported types: text, number (stringified, e.g. '30'), datetime (YYYY-MM-DD HH:mm:ss), enum")
cmd.Flags().String("performance", "medium", `engine size for the execution: "medium" (default) or "large"; credits are consumed based on actual compute resources used`)
cmd.Flags().String("performance", "medium", `engine size for the execution: "small", "medium" (default) or "large"; credits are consumed based on actual compute resources used`)
Comment thread
charisra marked this conversation as resolved.
cmd.Flags().Int("limit", 0, "maximum number of result rows to return (0 = all available rows)")
cmd.Flags().Bool("no-wait", false, "submit the execution and exit immediately, printing only the execution ID and state")
cmd.Flags().Int("timeout", 300, "maximum seconds to wait for the execution to complete before timing out")
Expand Down
Loading