Features
Intelligent Features

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_name against the schema explorer
  • Which schema prefix to use — if you reference accounts and the table exists in public but 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, and ORDER BY clauses

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 accounts to FROM 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 typeHighlighted
Syntax errorThe unexpected token
Undefined tableThe table name
Undefined columnThe column name
Type mismatchThe value or expression
Ambiguous columnThe 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:

  • KeywordsSELECT, 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 EXPLAIN analysis with plain-English interpretation
  • Destructive query warnings — detect DELETE or UPDATE without a WHERE clause 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.