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.

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.

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
note

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:

  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.


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.


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. Click Install Plugin and select your .db-driver.js file

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

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.
  • The AI Query Assistant works best with short, concrete descriptions. Include table names when you know them.