Intelligent Features
Zentro's intelligent layer uses your live schema and database engine feedback to help you write correct SQL faster and catch mistakes before they reach the database.
Schema Detection
When you open a query or start typing, Zentro inspects the SQL and detects:
- Which tables are referenced — auto-resolves
FROM table_nameagainst the schema explorer - Which schema prefix to use — if you reference
accountsand the table exists inpublicbut you're connected to a schema where it doesn't exist, Zentro warns you inline (as shown in the screenshot:Object "accounts" was not found in schema "pg_toast". Add a schema prefix or switch schema context.) - Column name validity — after detecting the table, Zentro validates column names in
SELECT,WHERE,JOIN ON, andORDER BYclauses
Schema Context Switching
If Zentro detects a table that exists in a different schema, a Quick Fix (Ctrl+.) is offered:
- Add schema prefix — rewrites
FROM accountstoFROM public.accounts - Switch schema context — changes the active schema in the Schema Explorer to where the table was found
Inline Error Detection
SQL errors returned by the database engine are mapped back to the correct line in the editor.
When a query fails, instead of showing the error only in the Result panel, Zentro underlines the specific token or line that caused the error — directly in the editor.
| Error type | Highlighted |
|---|---|
| Syntax error | The unexpected token |
| Undefined table | The table name |
| Undefined column | The column name |
| Type mismatch | The value or expression |
| Ambiguous column | The column reference |
Hover the underlined token to see the full error message. Click Quick Fix (Ctrl+.) for suggestions when available.
Auto-complete
The editor auto-complete (Ctrl+Space) is schema-aware:
- Keywords —
SELECT,FROM,WHERE,GROUP BY,HAVING,ORDER BY, etc. - Tables — all tables in the active schema, with column count shown
- Columns — after a table alias or name is typed, column completions appear with type annotations
- Functions — database-specific built-in functions with parameter hints
Type Annotations in Results
When results are shown in the Data Grid, column headers display the database type (TEXT, INT4, TIMESTAMPTZ, etc.) as a small label. This helps you understand what you're looking at without running \d table_name.
Future Intelligent Features
The intelligent layer is designed to grow. Planned additions include:
- Query explain hints — automatic
EXPLAINanalysis with plain-English interpretation - Destructive query warnings — detect
DELETEorUPDATEwithout aWHEREclause and warn before execution - Index suggestions — identify slow queries missing an index and suggest the right one
- AI-assisted query generation — natural language to SQL (opt-in)
These will appear in future releases without requiring any configuration changes.