sql_editor_save_draft
Autosave a SQL Editor tab's text, database, and cursor state without writing the open .sql file, so unsaved drafts can be restored.
Instructions
Autosave one SQL Editor tab's text, database and cursor (never writes the open .sql file itself).
``file_version``: for a file on SAS Viya, the version (ETag) the editor opened or last saved, so Save after
a restart still notices a newer version on the server.
``saved_hash`` is the editor's hash of the open file's last saved text, so a
restored draft knows whether it has unsaved changes; ``dirty`` says so for
the tab bar. ``origin``: the workload statement the tab was opened from
(``{"workload", "statement_id", "statement_name"}``), for "Update in workload".
``language``: what the tab runs as (singlestore, procsql, fedsql, cas); ``sas``: its SAS library / caslib
and PROC SQL options (outobs, noexec, feedback, pushdown).
``closed`` in the result: the tab was closed (elsewhere) and the text wasn't kept.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sas | No | ||
| sql | Yes | ||
| head | No | ||
| dirty | No | ||
| anchor | No | ||
| origin | No | ||
| tab_id | No | ||
| database | No | ||
| language | No | singlestore | |
| file_name | No | ||
| file_path | No | ||
| saved_hash | No | ||
| file_version | No | ||
| file_external | No | ||
| continue_on_error | No |