TableCore

Saved queries

The library holds queries you deliberately saved. It is not history and does not replace it: history answers what did I run just now?, the library answers give me the diagnostic query I run once a quarter.

Two save verbs, and they are different

ActionShortcutWhat it means
SaveCtrl/Cmd +SThis tab stops being a draft
Add to libraryCtrl/Cmd +Shift +SPut this query in the library

They sit next to each other on the editor toolbar. Ctrl+S still means only the first thing — the session restore rules depend on it — and the Shift is checked explicitly, so Shift+S never quietly saves the tab.

Once a tab is linked to a library entry, Add to library offers to update that entry rather than making a second copy. Deleting the entry breaks the link and the form goes back to adding. The link survives a restart along with the tab.

No retention, no limit

The library is the one place that deliberately parts company with history's rules. Both of history's limits are wrong here: content you wrote does not expire, and a library big enough to need an entry cap is a library somebody is using.

No connection, either

A library entry has no connection attached. Portability between connections is the reason the feature exists — you write the diagnostic query once and run it on dev, staging and production.

History is per-connection because it records that something happened somewhere. The library records an intent, and an intent has no where.

An entry does carry the database and collection as a hint. Opening it selects them only if they exist on the current connection; if they do not, the tab opens with a visible note naming both. A connection that cannot be queried is treated as having no databases — fail closed.

Why the hint is never applied silently

Quietly substituting a database would run somebody's production diagnostic in the wrong place and look like a success. That is the same class of mistake the grid's write provenance exists to prevent, and it gets the same answer: say what happened, do not guess.

Folders

Folder is a single string with / in it, not a tree. That is nesting without a nested data structure, a recursive editor, or a move operation that has to re-parent children.

The value is normalised on every save, so " Reports //Monthly/ " and "Reports/Monthly" are one folder.

A name already used by another entry in the same folder is refused, with the reason named. It is never quietly suffixed — the only honest suffix is the one on an explicit Duplicate, which you asked for.

The language is not stored

An entry's language is derived from its text every time it is read, including for the badge in the panel. A stored language would let an entry lie about its own content after you edited it.

Opening and running

An entry opens in a new tab, like a history entry and for the same reason.

Import and export

Import merges by id and reports what it refused:

  • a local copy that is not older than the incoming one is kept, and named in the report;
  • a name already taken in that folder by a different entry is refused.

An import that silently overwrites a colleague's changes is the failure mode that report exists to prevent.

Deleting

The library has its own confirmed delete under Settings → Privacy. It is separate from the query-history switch on purpose: turning off the automatic recording of what you ran and deleting the queries you deliberately wrote are opposite intentions, and neither should ever be a side effect of the other.

A failed save is reported rather than swallowed. History can afford to lose a row of bookkeeping; this file holds what you wrote.