Skip to main content

Databases

Rostyman includes a built-in database client that lets you connect to SQL, document, and key-value databases directly alongside your API work — no separate tool required.

Feature guide

Click the BookOpen icon next to "Databases" in the sidebar to launch the interactive 5-step feature tour.

Supported Databases

DatabaseDriverNotes
PostgreSQLBundledIncludes CockroachDB, Supabase, Neon, Amazon RDS
MySQLBundledIncludes MariaDB, PlanetScale, Amazon Aurora
SQLiteBundledLocal .db / .sqlite files
Microsoft SQL ServerBundledIncludes Azure SQL, Amazon RDS for SQL Server
MongoDBBundledAtlas, local, and connection-string URI
RedisBundledStandalone, Sentinel, Upstash
CockroachDBBundledUses PostgreSQL wire protocol
MariaDBBundledUses MySQL wire protocol
Community driversPluginInstall .db-driver.js files or browse the Community Registry

Connecting

New Connection Wizard

  1. Click Databases in the left sidebar
  2. Click + (New Connection)
  3. Pick a database type
  4. Fill in connection details (host, port, database, username, password)
  5. Click Test Connection to verify, then Save

The connection appears in the sidebar list and opens a new tab automatically.

Connection String URI

Toggle Use connection string to paste a full URI instead of filling individual fields:

postgres://user:pass@host:5432/dbname
mysql://user:pass@host:3306/dbname
mongodb+srv://user:pass@cluster.mongodb.net/db
redis://:pass@host:6379/0

The URI is stored as-is. Fields like host, port, and credentials are hidden when this mode is active.

SSH Tunnel

Enable SSH Tunnel to route the database connection through a jump host:

FieldDescription
SSH HostJump server hostname or IP
SSH PortDefault: 22
SSH UsernameLogin user on the jump server
Auth methodPassword or Private key file
Private key pathPath to your .pem / .ppk file
PassphraseOptional passphrase for the private key

When the tunnel is active, Rostyman opens a local TCP port, forwards it through SSH to the database host, then connects through that port.

Environment Variables in Connections

Any connection field supports {{variable}} tokens — resolved from globals, vault, and the active environment at connect time:

Host:     {{db_host}}
Port: {{db_port}}
Database: {{db_name}}
Username: {{db_user}}
Password: {{db_password}}

This makes it easy to switch between dev, staging, and production databases by changing your active environment.

Read-only Mode

Enable Read-only to prevent INSERT, UPDATE, DELETE, and DROP queries. Any destructive SQL shows a confirmation prompt regardless of this setting.


The Database Tab

Opening a connection opens a dedicated database tab with three main panels.

Schema Browser (left panel)

The schema browser shows every table and view in your database with their columns, types, and constraints:

  • Click a table to expand it and see column names, types, nullable flags, and primary keys
  • Right-click a table for quick actions: Browse data, Count rows, Select first 100, Copy table name, Export as CSV, Import data
  • Use the search box to filter by table or column name
  • A rainbow progress bar shows while the schema loads

Rostyman uses the live schema to power SQL autocomplete in the query editor.

Multi-Schema Databases (PostgreSQL, SQL Server)

When your database contains more than one user schema, a Schema dropdown appears at the top of the schema browser panel:

  • PostgreSQL — shows all non-system schemas (excludes pg_catalog, information_schema, pg_toast, and pg_* schemas). Defaults to public or the value set in the connection's Default Schema field.
  • SQL Server — shows all user schemas (excludes sys, INFORMATION_SCHEMA, guest, and db_*). Defaults to dbo.
  • MySQL, SQLite, MongoDB, Redis — these engines do not have a schema namespace at this level, so no dropdown appears.

Changing the selection immediately reloads the table list for the chosen schema. The query editor and autocomplete update to reflect the new schema's tables and columns.

To set the default schema for a PostgreSQL connection, open the connection wizard → Advanced tab → Default Schema field.

Query Editor (center panel)

Write and run SQL (or MongoDB queries) in a Monaco editor with full intellisense:

ActionHow
Run queryClick Run or press Ctrl+Enter
Stop long queryClick Stop
Format SQLClick Format or press Ctrl+Shift+F
AI assistClick AI Assist, describe what you want, press Enter
Insert variableType {{ to see available variables

Destructive query guard — any query containing DROP, TRUNCATE, DELETE without a WHERE, or ALTER TABLE DROP shows a confirmation prompt. Type confirm to unlock the Run button.

Multiple Query Tabs

Each database connection supports multiple independent query tabs. Click + in the tab strip at the top of the right panel to open a new tab with its own SQL, results, and execution state. Click × on a tab to close it (the last query tab cannot be closed).

Tab SQL content is saved automatically. When you reopen the connection, your query tabs are restored exactly as you left them — including all tab labels and SQL text.

SQL Autocomplete

The Monaco editor provides schema-aware autocomplete:

What you typeSuggestions shown
After FROM , JOIN , UPDATE , INTO Table names (and schema-qualified schema.table when multiple schemas exist)
tablename.Columns for that table with type hints
schemaname.Table names in that schema
schemaname.tablename.Columns for that table

The completion list updates automatically when you switch schemas via the schema selector dropdown.

AI Database Tools

The AI assistant is wired to your live connection — it sees your schema, so the SQL it generates actually runs against your tables.

AI Query Assistant — Plain-English to SQL

Click AI Assist in the query toolbar to open a natural-language prompt bar. Type a plain-English description of what you want and press Enter:

"Show the 10 most recent orders with customer names" "Count users who signed up this month grouped by country"

Rostyman generates the SQL (or MongoDB query, for MongoDB connections) and inserts it into the editor. Review and run it yourself — the assistant never executes queries automatically.

AI Schema Analysis

Click AI Analyse Schema in the database tab toolbar to run a one-click audit of the current schema. The assistant reports per-table:

  • Missing indexes on columns frequently used in WHERE / JOIN clauses
  • Missing constraints (e.g. NOT NULL on columns that should never be null, or missing foreign keys)
  • Type mismatches (e.g. dates stored as strings, money stored as floats, free-text columns wider than they need to be)

Each recommendation includes a one-line rationale. Apply changes manually — the assistant never alters your schema directly.

Stored Procedure / Function / Trigger / View Generator

Open AI → Generate Object… and choose the kind of object you want — stored procedure, function, trigger, or view. Describe the behavior in English; the assistant emits a CREATE statement in the right dialect (PG / MySQL / MSSQL / etc.) ready to run.

Generate CRUD API Collection

Click Generate API Collection in the database tab toolbar. Pick the tables you want covered (or all of them) and Rostyman builds a complete REST collection in your sidebar:

  • One folder per table
  • Five requests per table — List, Get by ID, Create, Update, Delete
  • {{baseUrl}} and ID parameters wired automatically
  • A progress dialog shows table count → request count stats while it runs
  • The new collection appears in your sidebar live (no restart needed)

You can keep editing the generated requests like any other collection — they aren't locked to the database.

Results Panel (right/bottom panel)

Query results appear in a grid with:

  • Column type badges — color-coded data type indicators on each column header
  • Multi-column sort — click a header to sort; Shift+click to add secondary sorts
  • Row detail panel — click any row to open a side panel showing all values with labels
  • Export — Copy to clipboard, or export as CSV, JSON, SQL INSERT statements, or Markdown table
  • Affected rows — shown for INSERT, UPDATE, DELETE
  • EXPLAIN tab — switch to see the query execution plan with a color-coded visualizer per driver (Postgres node tree with cost badges, MySQL row table, SQLite QP tree, generic keyword-highlighted fallback for the rest)
  • Long-running query notifications — queries that run past a configurable threshold pop a desktop notification so you can step away without losing track

Browsing Table Data

Right-click any table in the schema browser and choose Browse data, or switch to the Browse tab in the results panel.

The browse view shows paginated table rows with:

  • Filter by column — pick a column and enter a value to filter rows
  • Multi-column sort — Shift+click column headers
  • Inline editing — double-click a cell to edit it; changes queue in a preview bar until you click Commit changes or Discard
  • Pagination — navigate with Previous / Next buttons; row range shown in the status bar
note

Inline editing requires a primary key on the table. Tables without a primary key show a read-only notice.

Generated SQL

Every browse tab generates and tracks the exact SQL used to fetch the current page. Three icons in the far-right of the browse toolbar give you access to it:

IconAction
EyeHover to see the full SQL in a monospace tooltip popup
CopyCopy the SQL to the clipboard
External linkOpen the SQL in a new query tab for editing and running

Schema Isolation

Each browse tab remembers the schema it was opened from. Switching the Schema dropdown to inspect a different schema does not affect already-open browse tabs — clicking Refresh always uses the original schema the tab was opened with.

Browse tabs are also included in the automatic state save: when you reopen a connection, your open browse tabs (table, schema, page, filters, and sort) are restored.


Importing Data

Right-click a table and choose Import data… to load a CSV or JSON file into the table:

  1. Drag a .csv or .json file onto the import dialog, or click to browse
  2. Preview shows the detected row count and column count
  3. Click Import N rows to run the inserts

Rostyman uses column names from the file header to match database columns. Mismatched columns are ignored.


Query History

Every query you run is saved to the History tab (per connection). Click any entry to reload the SQL into the editor and re-run it. The history shows query text, execution time, row count, and status.


Saved Queries

Save a query with a name and optional description to the Saved tab for reuse across sessions. Saved queries are per-connection and stored locally.


DB Projects

Organize connections into a Project → Group → Connection hierarchy using the Projects view:

  1. Click the FolderGit toggle in the Databases sidebar header to switch to Projects view
  2. Click the folder icon to create a new project
  3. Hover a project and click + to add a group
  4. Click the folder icon on any connection to assign it to a group

Double-click a project or group name to rename it inline. The view mode is remembered across restarts.

Drag & Drop

Hover any connection row to reveal the grip handle on the left. Drag the connection onto any group header — the header highlights blue to indicate it will accept the drop. Release to move the connection into that group. Connections can be dragged across different projects.

Assign to Group Dialog

The Assign to Group dialog has a search bar to filter groups by name and displays the connection name at the top for context. Each project section has an inline + New Group button so you can create a group and assign the connection to it in one step — no need to exit the dialog first.


ER Diagram

Open the ER Diagram tab in any database tab to see a visual entity-relationship diagram of the current schema, with foreign-key relationships drawn as arrows between tables.

Layout & Navigation

  • Auto-detected foreign keys — relationships are introspected from the catalog (or inferred heuristically when the schema is loose). No manual mapping.
  • Drag to arrange — drag any table card to reposition it. The layout is saved per connection and restored automatically the next time you open the diagram.
  • Reset Layout — click the reset button to fall back to the auto-arranged default.
  • MiniMap — a small navigator in the bottom-right corner of the canvas. Drag the viewport rectangle to pan; scroll over it to zoom. Useful for large schemas.
  • Zoom-to-Area — click the crop icon in the toolbar, drag a rectangle on the canvas, release to zoom to fit. Press Esc to cancel.
  • Fullscreen mode — click the Maximize button in the header to expand the canvas edge-to-edge. Press Escape (or click Minimize) to return to the normal layout.

Export

FormatNotes
PNGHigh-resolution export at 3× the canvas pixel ratio. Good for slides and pull-request descriptions.
PDF (vector)True vector PDF — text and shapes stay sharp at any zoom level. Drop straight into a design doc.
Layout JSONExports the current node positions only. Share with a teammate or check into git; re-import to restore the same layout. The merge is self-healing — added or removed tables fall through cleanly.

Smart Refresh

The ER diagram doesn't re-fetch the schema every time you switch tabs. Click Refresh to re-introspect when you know the schema has changed.


Schema Diff

Compare two databases — or two snapshots of the same database — to see what changed and generate the SQL to bring one in line with the other.

  1. Open the Schema Diff tab in any database tab
  2. Pick a Source snapshot (saved automatically the first time you open Schema Diff on a connection) and a Target (the live schema, by default)
  3. The diff view highlights:
    • Added tables and columns (green)
    • Removed tables and columns (red)
    • Modified types, nullability, and defaults (amber)
  4. Click Generate Migration SQL to emit a CREATE / ALTER / DROP script that turns the source into the target. Copy it, run it from the query editor, or save to a file.

The migration SQL is dialect-aware — Postgres, MySQL, SQL Server, and SQLite each emit the right syntax for their engine.


Transactions

The query editor recognises BEGIN, COMMIT, and ROLLBACK as first-class statements. Multi-statement transactions stay on a single connection so locks behave predictably.

BEGIN;

UPDATE accounts SET balance = balance - 100 WHERE id = 1;
UPDATE accounts SET balance = balance + 100 WHERE id = 2;

-- Verify before committing
SELECT id, balance FROM accounts WHERE id IN (1, 2);

COMMIT; -- or ROLLBACK;

Run the whole block (Ctrl+Enter with no selection) or run statements one at a time and decide whether to commit at the end.


MongoDB Document Cards

For MongoDB connections, the results panel renders documents as expandable cards instead of a flat table:

  • Each document is a card with a toggle to expand or collapse nested objects and arrays
  • The full JSON is syntax-highlighted; long string fields are truncated with a click-to-expand
  • A table view is still available — click the toggle in the results header to switch

This makes nested MongoDB documents readable without the table view fighting against them.


Redis Key Browser

For Redis connections, the schema browser shows a key list instead of tables:

  • Pattern filter — type a glob like user:* to narrow the list (uses SCAN with MATCH under the hood, never KEYS)
  • Type-aware rendering — keys render with their type badge (STRING / HASH / LIST / SET / ZSET / JSON) and clicking a key opens a value inspector tailored to its type
  • TTL inspection — every key shows its remaining TTL (or "no expiry") in the list
  • One-click delete — right-click any key for a confirm-and-delete action

Linked Contexts — DB Verify

Add a DB Verify tab to any HTTP request to automatically verify API responses against live database state:

  1. Open any HTTP request tab
  2. Click DB Verify in the tab bar
  3. Select a database connection and write a verification query
  4. Enable Auto-run after each request to run it automatically

After each HTTP request, the verification query runs and compares:

  • Row count returned by the query vs. array length of the JSON response body
  • Match → green badge; mismatch → shows both counts

This is useful for confirming that a POST /users response matches a new row in SELECT * FROM users — without leaving the request tab to alt-tab to a separate database tool.


DB Query Node in Workflows

Use the DB Query node in the Workflow editor to run a database query as a step in an automated sequence:

  1. Drag DB Query from the node palette
  2. In the config panel, select a connection and write your SQL
  3. Set a Result variable name (default: dbRows)

The query result is serialized as a JSON array of objects and stored in the named variable. Subsequent nodes can read it via {{dbRows}} or use it in assertions.


Database Drivers

Managing Drivers

Click the puzzle icon in the Databases sidebar header to open the Driver Manager. It shows:

  • Bundled drivers — ship with the app, always available
  • Installed plugins — custom .db-driver.js files you've added
  • Community Registry — browse and install community-contributed drivers

Custom Driver Plugins

To install a custom driver:

  1. Open Driver Manager → click Export Template to download a fully-commented starter file
  2. Implement connect(), query(), introspect(), and disconnect() in the file
  3. Optionally implement listSchemas() to enable the schema selector dropdown for your driver
  4. Click Install Plugin and select your .db-driver.js file

The driver appears immediately in the New Connection wizard.

The listSchemas(handle) method is optional — if omitted, no schema dropdown is shown and introspect() is called without a schema argument.

Community Registry

The Driver Manager includes a Community Registry panel that fetches available drivers from registry.rostyman.com. Browse by name, click Install, and the driver is downloaded and registered without restarting.


Connection Health

Auto-reconnect

If a connection drops (network blip, server restart), Rostyman automatically attempts one reconnect before showing an error. No manual intervention needed for transient failures.

Connection Status

The database tab header shows a status dot:

  • 🟢 Connected
  • ⚫ Disconnected

The sidebar list also shows a green ring on the connection badge when the tab is open and connected.

The badge icon in both the sidebar and the tab header uses the color you chose for the connection in the wizard. To change it, open the connection wizard and pick a new color from the color swatch.


Keyboard Shortcuts

ActionShortcut
Run queryCtrl+Enter
Format SQLCtrl+Shift+F
Stop queryClick Stop button

Tips

  • Use connection string URI mode for cloud databases (Neon, Supabase, PlanetScale) that provide a ready-made connection string in their dashboards.
  • Use environment variables in connection fields to keep credentials out of your saved config and switch between dev/staging/prod with one click.
  • The SSH Tunnel works with all database types — useful for databases behind a bastion host.
  • DB Projects are cosmetic only — connections work identically inside or outside a project. Use them to mirror your team's infrastructure layout. Drag the grip handle on any connection row to move it between groups without opening a dialog.
  • The AI Query Assistant works best with short, concrete descriptions. Include table names when you know them.
  • For PostgreSQL connections with multiple schemas, set the Default Schema in the Advanced tab of the connection wizard so the right schema is pre-selected every time you connect.
  • When writing cross-schema SQL, use schema.tablename syntax — autocomplete recognises schema names and suggests their tables.