Add debugging option to include the SQL queries in the output
It would make debugging and learning somebody else's SQLPage site easier if I can hover over a component to see the SQL that was used to generate it.
For example, when I hover over a button like this
I would see the SQL in a popover like this
That would indeed be cool! But also a lot of work to implement :) I think we'll focus on important much requested new features at first.
Couldn't you edit the SQL in the backend so that another expression is added?
For example:
SELECT 'purple' AS title , 'purple' AS outline;
becomes
SELECT 'purple' AS title , 'purple' AS outline , 'SELECT \'purple\' AS title, \'purple\' AS outline;' AS sql_query;
I tried to look at it at https://github.com/sqlpage/SQLPage/blob/main/src/webserver/database/sql.rs, but I can't get along with Rust.
And the data can then be displayed in the respective handlebars using the sql_query parameter.
Or are there better approaches?