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.
Click the BookOpen icon next to "Databases" in the sidebar to launch the interactive 5-step feature tour.
Supported Databases
| Database | Driver | Notes |
|---|---|---|
| PostgreSQL | Bundled | Includes CockroachDB, Supabase, Neon, Amazon RDS |
| MySQL | Bundled | Includes MariaDB, PlanetScale, Amazon Aurora |
| SQLite | Bundled | Local .db / .sqlite files |
| Microsoft SQL Server | Bundled | Includes Azure SQL, Amazon RDS for SQL Server |
| MongoDB | Bundled | Atlas, local, and connection-string URI |
| Redis | Bundled | Standalone, Sentinel, Upstash |
| CockroachDB | Bundled | Uses PostgreSQL wire protocol |
| MariaDB | Bundled | Uses MySQL wire protocol |
| Community drivers | Plugin | Install .db-driver.js files or browse the Community Registry |
Connecting
New Connection Wizard
- Click Databases in the left sidebar
- Click + (New Connection)
- Pick a database type
- Fill in connection details (host, port, database, username, password)
- 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:
| Field | Description |
|---|---|
| SSH Host | Jump server hostname or IP |
| SSH Port | Default: 22 |
| SSH Username | Login user on the jump server |
| Auth method | Password or Private key file |
| Private key path | Path to your .pem / .ppk file |
| Passphrase | Optional 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.
Query Editor (center panel)
Write and run SQL (or MongoDB queries) in a Monaco editor with full intellisense:
| Action | How |
|---|---|
| Run query | Click Run or press Ctrl+Enter |
| Stop long query | Click Stop |
| Format SQL | Click Format or press Ctrl+Shift+F |
| AI assist | Click AI Assist, describe what you want, press Enter |
| Insert variable | Type {{ 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.
AI Query Assistant
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 and inserts it into the editor. Review and run it yourself — the assistant never executes queries automatically.
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 (PostgreSQL, MySQL, SQLite supported)
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
Inline editing requires a primary key on the table. Tables without a primary key show a read-only notice.
Importing Data
Right-click a table and choose Import data… to load a CSV or JSON file into the table:
- Drag a
.csvor.jsonfile onto the import dialog, or click to browse - Preview shows the detected row count and column count
- 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:
- Click the FolderGit toggle in the Databases sidebar header to switch to Projects view
- Click the folder icon to create a new project
- Hover a project and click + to add a group
- 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.
Linked Contexts — DB Verify
Add a DB Verify tab to any HTTP request to automatically verify API responses against live database state:
- Open any HTTP request tab
- Click DB Verify in the tab bar
- Select a database connection and write a verification query
- 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.
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:
- Drag DB Query from the node palette
- In the config panel, select a connection and write your SQL
- 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.jsfiles you've added - Community Registry — browse and install community-contributed drivers
Custom Driver Plugins
To install a custom driver:
- Open Driver Manager → click Export Template to download a fully-commented starter file
- Implement
connect(),query(),introspect(), anddisconnect()in the file - Click Install Plugin and select your
.db-driver.jsfile
The driver appears immediately in the New Connection wizard.
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.
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Run query | Ctrl+Enter |
| Format SQL | Ctrl+Shift+F |
| Stop query | Click 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.
- The AI Query Assistant works best with short, concrete descriptions. Include table names when you know them.