MATIH Platform is in active MVP development. Documentation reflects current implementation status.
15. Workbench Architecture
Query Editor

Query Editor

The Query Editor at frontend/data-workbench/src/components/QueryEditor/ provides a full SQL development environment with schema-aware autocomplete, results grid, and query history.


Components

ComponentFilePurpose
QueryEditor (index)index.tsxMain layout container
SqlEditorSqlEditor.tsxSQL input with Monaco Editor
ResultsGridResultsGrid.tsxTabular results display
QueryHistoryQueryHistory.tsxRecent query list

SqlEditor

Uses the shared SqlEditor component from @matih/shared with data-workbench-specific schema integration:

  • Schema metadata loaded from the active data source
  • Autocomplete for tables, columns, and functions
  • Ctrl+Enter to execute
  • Error markers from SQL validation

ResultsGrid

Features:

  • Sortable columns
  • Column resizing
  • Cell value copy
  • Export to CSV/JSON
  • Row count and execution time display
  • Pagination for large result sets

QueryHistory

Displays recent queries with:

  • SQL preview
  • Execution time
  • Row count
  • Status (success/error)
  • Quick re-run
  • Save to favorites