Query Interface

Scratchpad Introduction

Scratchpad Introduction

Scratchpad is WhoDB's query workspace for connections that support raw queries — SQL databases, plus shell-style commands for MongoDB and commands for Redis. It gives you page-based query organization, one or more query cells per page, query execution, result grids, action-query confirmations, and per-cell query history.

Open Scratchpad

Open Scratchpad from the left sidebar. The route is /scratchpad.

Scratchpad Main View

The current layout is vertical:

  • The SQL editor is at the top of each cell.
  • Query results or action status render below the editor.
  • Multiple cells stack vertically within the active page.
  • Scratchpad pages appear as tabs above the cells.

Run Queries

Type SQL into the editor and run it with any of:

  • The run button at the bottom-right of the cell. It appears on hover (or when the page has a single cell) and is hidden while the editor is empty.
  • The per-statement play buttons in the editor's left gutter, which run one statement at a time.
  • Cmd/Ctrl + Enter.

Scratchpad Query Results

SELECT queries show a results grid below the editor. Action queries such as INSERT, UPDATE, and DELETE show an action result after confirmation.

Scratchpad Action Result

Errors

Database errors are shown below the editor for the cell that failed.

Scratchpad Query Error

Start with a small query such as SELECT 1;, then add complexity back until the error is isolated.

Pages And Cells

Scratchpad has two levels of organization:

  • Pages are tabs across the top. Use the plus tab to add a page. Double-click a page name to rename it. Use the close button on a page tab to delete it.
  • Cells are query editors inside a page. Hover over a cell to reveal the add, clear, delete, and run controls.

Scratchpad Multiple Pages

The cell options menu currently contains Clear, Copy Code, and Query History.

Scratchpad Cell Options Menu

Use the visible page tabs and cell controls to organize Scratchpad work.

Query History

Open query history from the cell options menu or the history button on the cell.

Query History Panel

History is stored per cell. Entries show the query text, success/error status, and timestamp. From a history entry you can copy the SQL, load it back into the current editor, or run it again.

Editor Shortcuts

Shortcut
Action
Cmd/Ctrl + Enter
Run the current query or selected SQL
Cmd/Ctrl + U
Clear the current editor
Writing Queries

Learn the editor behavior and SQL execution flow.

Query History

See what history stores and how to reuse entries.