Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AskCmd ¶
type AskCmd struct {
Prompt []string `arg:"" help:"Natural-language prompt. Multiple tokens are joined with spaces so quoting is optional."`
Output string `short:"o" default:"table" enum:"table,json,csv" help:"Output format: table, json, or csv."`
DryRun bool `short:"n" help:"Print the generated SQL to stdout and exit without executing. Handy for piping into 'rdq exec --file -'."`
Quiet bool `short:"q" help:"Suppress the '-- Generated SQL:' echo on stderr. Error messages and '(N rows affected)' still go to stderr."`
Yes bool `` /* 159-byte string literal not displayed */
// contains filtered or unexported fields
}
AskCmd is the Kong struct for `rdq ask`. It turns a natural-language prompt into SQL via Amazon Bedrock and then funnels the generated statement through the same downstream pipeline exec uses (read-only gate → destructive confirmation → Data API → history → render), so a user who flips read-only on in the TUI sees identical behaviour here.
The unexported seams exist so ask_test.go can exercise every branch without hitting AWS. Production callers should never set them.
type ExecCmd ¶
type ExecCmd struct {
SQL string `arg:"" optional:"" help:"SQL statement to execute. Mutually exclusive with --file."`
File string `short:"f" help:"Read SQL from file path. Use - for stdin."`
Output string `short:"o" default:"table" enum:"table,json,csv" help:"Output format: table, json, or csv."`
Yes bool `` /* 159-byte string literal not displayed */
// contains filtered or unexported fields
}
ExecCmd is the Kong struct for `rdq exec`. The stub was replaced with a one-shot runner that reuses the same engine the TUI and GUI talk to.
SQL is optional as a positional arg so users can supply it via --file instead. Mutually exclusive with --file; both empty or both set is a usage error.
The unexported seams (executeSQL, loadState, isTerminal) are intentionally left unexported: they exist only so exec_test.go can exercise every branch without hitting AWS. Production callers should never set them.
type GUICmd ¶
type GUICmd struct {
Port int `help:"Port to listen on." short:"P" default:"8080"`
NoOpen bool `help:"Do not open browser automatically."`
Dev bool `help:"Allow http://localhost:5173 as an origin so the Vite dev server can talk to this API."`
}