Replace derived table wrapping with direct TOP injection for SQL Server to prevent error 8155 when inner SELECT produces unnamed columns (e.g. SELECT @@version). Also preserves ORDER BY that was incorrectly stripped by the previous approach.
- Fuzzy matching with character-order scoring (typo/abbreviation tolerant) - Context-aware keyword filtering (DDL hidden in SELECT, etc.) - CTE/subquery column resolution from parsed definitions - INSERT column list completion - Schema name completion - Smart GROUP BY non-aggregated column suggestions - Better FK join inference (shared FK, parent_id, created_by patterns) - Table alias suggestions - SELECT * expansion to explicit column list - Type-aware comparison value hints (string/numeric/boolean/NULL) - Function signature inline documentation (30+ functions) - History-based learning ranking via recordCompletionSelection() - Epoch-based request debouncing in QueryEditor.vue - Irregular plural handling for singular table names - Quoted identifier parsing for dots in names