SQL Analysis
Learn how the editor automatically analyzes SQL for statement separation and table recognition.
Auto SQL Statement Extraction
When multiple SQL statements are written in the editor, NeoSQL automatically splits them by semicolons (;).
Splitting rules:
- Statements are split by semicolons (
;) - Semicolons inside string literals (
'...',"...") are ignored - Semicolons inside comments (
-- ...,/* ... */) are ignored
Cursor-based extraction during EXECUTE:
- Cursor inside a SQL statement → that statement is the execution target
- Cursor on an empty line → the nearest SQL statement above is the execution target
This behavior allows you to write multiple SQL statements in a single editor and selectively execute specific ones by moving the cursor.
Auto Table Extraction from SQL
As you write SQL, NeoSQL automatically recognizes referenced table names. This information is used for the following features:
| Feature | Description |
|---|---|
| Autocomplete | Columns from tables used in FROM/JOIN clauses are prioritized in the autocomplete list. |
| Alias Recognition | When you alias a table like FROM users u, typing u. suggests columns from the users table. |
| FK Reference | Identifies FK columns in the result grid and provides row lookup functionality. |
| Inline Edit | Determines whether it's a single-table query to decide if edit mode can be activated. |
Recognized table reference locations:
FROMclauseJOINclause (INNER, LEFT, RIGHT, FULL, CROSS)INSERT INTOtarget tableUPDATEtarget tableWITH(CTE) subqueries
