sql_editor_query
Run read-only SQL statements from the SingleStore SQL Editor, streaming the first rows right away while the rest load for paging; data-changing SQL routes to confirmation.
Instructions
Run a read-only statement from the SQL Editor app, streaming its result.
Returns as soon as the first ``max_rows`` rows (the first page) are in, or the result is complete; the
rest keeps loading on the server (up to SINGLESTORE_MCP_EDITOR_MAX_ROWS, default 100,000 rows) and the
app pages through it with sql_editor_rows (``done`` / ``loaded`` give the progress and the total).
``stream_id`` is chosen by the app, so its Stop (sql_editor_stop) works before this call returns;
``replaces``: the tab's previous result, dropped. Statements that change data or schema are answered
with ``needs_confirmation`` instead of running; the app then asks the user and uses
sql_editor_execute. Every run lands in the editor's history (when it has finished), with the tab
(``tab_id``, its label ``tab``) and open ``file`` it ran from.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| tab | No | ||
| file | No | ||
| tab_id | No | ||
| database | No | ||
| max_rows | No | ||
| replaces | No | ||
| stream_id | No |