Integrate NodeQL as a visual SQL builder for FQLite#25
Merged
Conversation
…or FQLite ## Summary This PR adds NodeQL as an optional visual SQL builder inside FQLite. FQLite remains the main Forensic SQLite recovery and analysis application. NodeQL is not intended to replace existing FQLite workflows. It is added as an additional query-building layer for users who want to compose SQL visually, especially when working with recovered SQLite data, deleted records, journal/WAL artifacts, or unfamiliar database schemas. The goal is to make SQL exploration inside FQLite more approachable without reducing the power of the existing SQL Analyzer. ## Why this belongs in FQLite FQLite is used in forensic SQLite analysis, where users often need to inspect unknown or partially recovered database structures. In these situations, writing SQL manually can be repetitive and error-prone: - table and column names may be unfamiliar - recovered datasets may need quick filtering and sorting - investigators may want to build queries step by step - less SQL-experienced users still need reliable access to the SQL Analyzer - complex queries often start as simple exploratory SELECT statements NodeQL helps in exactly this area. It gives users a visual way to assemble SQL commands and then passes the generated SQL into FQLite's existing SQL Analyzer. This keeps the current analyzer as the execution point while adding a guided builder in front of it. In other words: NodeQL does not change the forensic core of FQLite. It improves access to it. ## User workflow The intended workflow is: 1. Open a SQLite database in FQLite. 2. Open `Analyze > NodeQL Builder...` or use the `NodeQL` toolbar button. 3. Compose a query using visual SQL blocks. 4. Snap blocks under `EXECUTE QUERY`. 5. Review the generated SQL preview. 6. Send the generated SQL to FQLite's existing SQL Analyzer. 7. Execute the query there using the normal FQLite play button. This keeps execution, result display, and database handling inside FQLite's established SQL Analyzer. ## What this PR adds ### FQLite UI integration - Adds a `NodeQL Builder...` item under the Analyze menu. - Adds a `NodeQL` toolbar button. - Enables the builder only when a SQLite database is open and selected. - Shows clear error messages when the builder is opened without a usable database context. ### Visual SQL builder Adds a JavaFX-based builder window with: - block palette on the left - large workspace / infinite-canvas-style area - `EXECUTE QUERY` snap target - generated SQL preview on the right - button to send SQL into the existing SQL Analyzer The builder is styled to fit FQLite as a Forensic SQLite tool, using a light UI instead of a standalone dark visual-editor look. ### SQL block coverage The builder includes block groups for: - DQL - DML - DDL - DCL - TCL - joins and set operations - aggregate functions - SQL functions This gives the integration room to support both simple forensic inspection queries and more advanced SQL composition. ### Query composition The SQL generation has been adjusted so SELECT-style chains are assembled in a valid SQL order: - SELECT projections - FROM table - JOIN clauses - WHERE conditions - GROUP BY - HAVING - ORDER BY - UNION / INTERSECT / EXCEPT Projection handling was improved so additional selected columns are merged into the SELECT list. If explicit columns are selected, the default `*` is removed to avoid invalid or misleading queries such as `SELECT *, name, id ...` when the user clearly selected specific columns. ### Interaction improvements The builder supports: - drag and snap behavior - block deletion via Delete, Backspace, toolbar button, or block `x` - workspace clear - zoom buttons - Ctrl/Cmd + scroll zoom - trackpad pinch zoom - canvas panning - undo via Ctrl+Z / Command+Z Undo currently covers: - adding blocks - deleting blocks - clearing the workspace - moving and snapping blocks - editing block text fields This makes the builder feel like a normal desktop editing tool and reduces the risk of losing work while experimenting with queries. ### SQL Analyzer behavior The SQL Analyzer remains the execution surface. This PR intentionally removes the earlier idea of opening NodeQL project files directly inside the SQL Analyzer. That flow is not useful for FQLite. The correct integration is: ```text NodeQL Builder -> Generated SQL -> SQL Analyzer -> Execute
pawlaszczyk
reviewed
Jun 15, 2026
pawlaszczyk
left a comment
Owner
There was a problem hiding this comment.
Hi,
Where can I find those imports:
import digital.codespiresolutions.nodeql.BlockNode;
import digital.codespiresolutions.nodeql.BlockType;
import digital.codespiresolutions.nodeql.Position;
import digital.codespiresolutions.nodeql.SqlCompileResult;
import digital.codespiresolutions.nodeql.SqlCompiler.
I couldn't find a jar or the source files?
Contributor
Author
|
@pawlaszczyk I forgot to include them. I created a new PR: #26 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds NodeQL as an optional visual SQL builder inside FQLite.
FQLite remains the main Forensic SQLite recovery and analysis application. NodeQL is not intended to replace existing FQLite workflows. It is added as an additional query-building layer for users who want to compose SQL visually, especially when working with recovered SQLite data, deleted records, journal/WAL artifacts, or unfamiliar database schemas.
The goal is to make SQL exploration inside FQLite more approachable without reducing the power of the existing SQL Analyzer.
Why this belongs in FQLite
FQLite is used in forensic SQLite analysis, where users often need to inspect unknown or partially recovered database structures. In these situations, writing SQL manually can be repetitive and error-prone:
NodeQL helps in exactly this area. It gives users a visual way to assemble SQL commands and then passes the generated SQL into FQLite's existing SQL Analyzer. This keeps the current analyzer as the execution point while adding a guided builder in front of it.
In other words: NodeQL does not change the forensic core of FQLite. It improves access to it.
User workflow
The intended workflow is:
Analyze > NodeQL Builder...or use theNodeQLtoolbar button.EXECUTE QUERY.This keeps execution, result display, and database handling inside FQLite's established SQL Analyzer.
What this PR adds
FQLite UI integration
NodeQL Builder...item under the Analyze menu.NodeQLtoolbar button.Visual SQL builder
Adds a JavaFX-based builder window with:
EXECUTE QUERYsnap targetThe builder is styled to fit FQLite as a Forensic SQLite tool, using a light UI instead of a standalone dark visual-editor look.
SQL block coverage
The builder includes block groups for:
This gives the integration room to support both simple forensic inspection queries and more advanced SQL composition.
Query composition
The SQL generation has been adjusted so SELECT-style chains are assembled in a valid SQL order:
Projection handling was improved so additional selected columns are merged into the SELECT list. If explicit columns are selected, the default
*is removed to avoid invalid or misleading queries such asSELECT *, name, id ...when the user clearly selected specific columns.Interaction improvements
The builder supports:
xUndo currently covers:
This makes the builder feel like a normal desktop editing tool and reduces the risk of losing work while experimenting with queries.
SQL Analyzer behavior
The SQL Analyzer remains the execution surface.
This PR intentionally removes the earlier idea of opening NodeQL project files directly inside the SQL Analyzer. That flow is not useful for FQLite. The correct integration is: