View mode and edit mode
What each mode allows - opening, saving, deleting documents and creating indexes - and which confirmations appear.
A table tab is in view mode or edit mode. The rules are unit-tested.
| View mode | Edit mode | |
|---|---|---|
| Opened by | left click or Enter on a table; menu "View data"; "Properties" | menu "Edit data", "Edit table"; the Switch to edit mode button on a tab |
| Badge | "View mode" (grey) | "Edit mode" (accent colour); the tab title ends "(edit)" |
| Open a document by key | yes, read only (Save and Delete disabled, with a reason) | yes |
| Save or replace a document | no | yes; if the key exists a Replace confirmation naming the key appears first |
| Delete a document | no | yes, always after a Delete confirmation naming the key |
| New document | disabled | enabled |
| New index... | not offered | on the Properties (edit) tab: field with suggestions, kind ordered or hash |
The same table can be open once in each mode. In ST2 the server's reply was checked in Chrome: a replace stayed unapplied until the confirmation was accepted, and Escape cancelled it.
Table menu#
View data, Edit data, Edit table, Select top 1000 rows, Properties, Refresh.
Index kinds#
An ordered index holds numbers only; on a text column it has 0 entries by design, so use hash for text.
Not supported yet#
- Editing several rows in one staged transaction with a diff and undo.
- Dropping a column or changing a column type (the server does not track column types yet).