v0.20.0
SQLPage v0.20 introduces sqlpage.run_sql
!
We're excited to announce the release of SQLPage v0.20.0, with one exciting and long awaited feature, and many small fixes and improvements...
If you are new here: SQLPage is a small web server that renders your SQL queries as beautiful interactive websites.
What's new ?
- file inclusion. This is a long awaited feature that allows you to include the contents of one file in another. This is useful to factorize common parts of your website, such as the header, or the authentication logic. There is a new
sqlpage.run_sql
function that runs a given SQL file and returns its result as a JSON array. Combined with the existingdynamic
component, this allows you to include the content of a file in another, like this:-
select 'dynamic' as component, sqlpage.run_sql('header.sql') as properties;
- if you encounter any issue with this new feature, please open an issue or Github, or open a new thread in community discussions
-
- more powerful dynamic component: the
dynamic
component can now be used to generate the special header components too, such as theredirect
,cookie
,authentication
,http_header
andjson
components. Theshell
component used to be allowed in dynamic components, but only if they were not nested (a dynamic component inside another one). This limitation is now lifted. This is particularly useful in combination with the new file inclusion feature, to factorize common parts of your website. There used to be a limited to how deeply nested dynamic components could be, but this limitation is now lifted too. - Add an
id
attribute to form fields in the form component. This allows you to easily reference form fields in custom javascript code. - New
rss
component to create RSS feeds, including podcast feeds. You can now create and manage your podcast feed entirely in SQL, and distribute it to all podcast directories such as Apple Podcasts, Spotify, and Google Podcasts. - Better error handling in template rendering. Many template helpers now display a more precise error message when they fail to execute. This makes it easier to debug errors when you develop your own custom components.
- better error messages when an error occurs when defining a variable with
SET
. SQLPage now displays the query that caused the error, and the name of the variable that was being defined. - Updated SQL parser to v0.44
- support EXECUTE ... USING in PostgreSQL
- support
INSERT INTO ... SELECT ... RETURNING
, which allows you to insert data into a table, and easily pass values from the inserted row to a SQLPage component. postgres docs, mysql docs, sqlite docs - support
UPDATE ... FROM
in SQLite
- Bug fixes in charts. See apexcharts.js v3.47.0