Database Studio & Query Runner

Learn how to use TurboV's built-in Database Studio to inspect schemas, browse table records, run SQL queries, and export data directly from your browser.


1. Overview & Architecture

You no longer need to install external database GUI clients or configure SSH tunnels to inspect your data. TurboV features a full-featured Database Studio built directly into the web dashboard.

Secure Query Pipeline

[ Dashboard UI (Browser) ]
            │
            │ REST Request: /api/v1/databases/:id/viewer/query
            ▼
[ TurboV Control Plane ]
            │ Validates organization permissions & decrypts credentials in memory
            │ Dispatches secure command event
            ▼
[ TurboV Agent Daemon (Target Server) ]
            │ Connects to local container via internal Docker network
            │ Executes query action: getTables | getTableSchema | getTableData | executeQuery
            ▼
[ Managed Database Container: db-postgres / db-mysql ]

All queries execute locally on the target host. No persistent database ports are exposed to the public internet, and credentials are never transmitted to the browser client.


2. Schema Explorer

Open any managed database in the dashboard and click the Database Studio tab:

  • Tables & Views: The left sidebar lists all database tables and views organized by schema (e.g. public).
  • Column Metadata: Inspect column names, data types (e.g. uuid, varchar, timestamptz), nullability, default values, and primary key indicators.
  • Foreign Key Relationships: Click on any foreign key column to jump directly to the referenced parent table.

3. Table Data Viewer

Click on any table in the schema sidebar to open the interactive data browser:

  • Pagination: Browse large tables using server-side pagination (limit and offset) without exhausting client memory.
  • Sorting: Click any column header to sort in ascending (ASC) or descending (DESC) order.
  • Dynamic Filters: Filter table records on the fly using intuitive operators:
    • Text: equals, contains, starts_with, ends_with, is_null
    • Numbers & Dates: greater_than, less_than, between
    • Booleans: is_true, is_false

4. Raw SQL Query Runner

For complex joins, aggregates, or data migrations, switch to the Query Runner tab:

SELECT 
  u.id, 
  u.email, 
  COUNT(o.id) AS total_orders, 
  SUM(o.amount) AS lifetime_value
FROM users u
LEFT JOIN orders o ON o.user_id = u.id
WHERE u.created_at >= NOW() - INTERVAL '30 days'
GROUP BY u.id, u.email
ORDER BY lifetime_value DESC
LIMIT 50;

Safety Guards

  • Execution Timeout: Queries are bounded by a strict 30-second execution timeout to prevent runaway queries from locking database tables.
  • Transaction Safety: Data mutations (UPDATE, DELETE) require explicit user confirmation to prevent accidental data loss.

5. Exporting Query Results

Export query results or entire table views with a single click:

  • CSV: Download records formatted for spreadsheet tools (Excel, Google Sheets).
  • JSON: Export structured JSON arrays for API mocking, scripting, or data migrations.