Page: SQL Console¶
Monaco-powered SQL editor for direct SpacetimeDB queries.
Overview¶
The SQL Console is a developer tool (Owner-only) that provides a Monaco Editor-powered SQL interface for running queries directly against SpacetimeDB.
Access Control¶
This page requires AdminLevel = Owner (2) and is in the Developer navigation group.
Features¶
| Feature | Description |
|---|---|
| Monaco Editor | Full-featured code editor with syntax highlighting |
| Custom Theme | qs-bridge-dark theme matching the panel's amber/rust palette |
| Keyboard Shortcut | Ctrl+Enter to execute the current query |
| Results Table | Query results displayed in a data table below the editor |
| Error Display | SQL errors shown with descriptive messages |
Custom Monaco Theme¶
The qs-bridge-dark theme uses the panel's design system colours:
| Token | Colour | Usage |
|---|---|---|
| Background | #0f0d0b |
Editor background |
| Foreground | #c4beb4 |
Default text |
| Keywords | #d4915c |
SQL keywords (SELECT, FROM, WHERE, etc.) |
| Strings | #6aab78 |
String literals |
| Numbers | #5a9dc4 |
Numeric values |
| Comments | #504944 |
SQL comments |
Security Note¶
The SQL Console allows running arbitrary queries against the SpacetimeDB module. This is why it is restricted to Owner-level access only. In production, consider disabling this feature or adding query auditing.
Related Pages¶
- Tables Browser — visual table browser
- Platform Tables — table documentation