docs: sync MDX content with implementation

This commit is contained in:
t8y2
2026-05-17 11:35:15 +08:00
parent 71f9f11eec
commit 3337826b89
37 changed files with 738 additions and 218 deletions
+19
View File
@@ -43,6 +43,20 @@ When text is selected, DBX executes only the selected SQL. When nothing is selec
After execution, the result area shows returned rows, duration, affected row count, or the error message. For multi-statement scripts, select the exact fragment you want to run to reduce mistakes.
DBX also tracks query sessions so long-running result sets can be closed when you leave them, and active queries can be cancelled from the UI when the database driver supports cancellation.
## Execution Scope
| Scope | How It Is Chosen | Use Case |
|---|---|---|
| Selected SQL | Highlight text before running | Safest option for multi-statement scratch pads |
| Current statement | Use editor cursor workflows where available | Run one statement without selecting text manually |
| Full editor | Run with no selection | Single-purpose query tabs and short scripts |
<Callout type="warn">
DBX can execute batches and scripts, but the query editor is still safest when you run one reviewed statement at a time. Use [SQL File Execution](/en/docs/sql-file) for large `.sql` files that need progress tracking.
</Callout>
## Autocomplete
Completion suggestions come from the active database context:
@@ -71,6 +85,7 @@ DBX records executed SQL so you can reuse it later:
- Previous statements can be reviewed by time
- Clicking a history item loads it back into the editor
- Useful for investigation queries, reports, and repair statements
- History entries preserve enough context to identify manual queries and AI-assisted work
<Callout type="warn">
Query history may include business fields, table names, or filter values. Be mindful of sensitive information on shared machines or demo environments.
@@ -79,3 +94,7 @@ Query history may include business fields, table names, or filter values. Be min
## Working With the Data Grid
Query results open in the [Data Grid](/en/docs/data-grid). If the result is editable, DBX shows the SQL before saving changes. For analysis-only results, you can export CSV, JSON, or Markdown.
## Working With AI
The editor can send the current SQL, active connection type, database name, recent error, result preview, and loaded schema context to the [AI Assistant](/en/docs/ai-assistant). In Ask mode, AI returns SQL and explanations only. In Agent mode, DBX applies an execution policy before attempting to run generated SQL.