# Phase 18 — SQL Editor and Result Grid Built from the Phase 17 project archive and includes the correction for the Phase 17 `localizedCaseInsensitiveHasPrefix` compilation error. ## Changes - Execute highlighted SQL independently of the complete editor buffer (Run Selection). - SQL completion includes cached table and view names loaded in the Schemas navigator, alongside SQL keywords. Column-aware suggestions are not yet implemented. - Case-insensitive local filtering of query result rows. - Local result sorting by chosen column, ascending or descending. - CSV export of the currently displayed rows, with RFC-style doubled quotes, UTF-8 BOM and CRLF line endings. - Query elapsed wall-clock time, shown after execution completes (includes connection overhead). ## Limitations - Result grid filters/sorts operate only on rows returned by the existing query engine, not the full database table. - The CSV writer constructs the file in memory and should not be used for huge result sets. - SQL autocomplete suggestions depend on schemas already loaded; no column metadata is fetched. - No new SQL error underlining was added. - Not compiled on macOS or tested against a MySQL server; run xcodebuild on the Mac.