Releases: sqlpage/SQLPage
v0.15.2
0.15.2 (2023-11-12)
- Several improvements were made to the map component
- Fix a bug where the new geojson support in the map component would not work when the geojson was passed as a string. This impacted databases that do not support native json objects, such as SQLite.
- Improve support for geojson points (in addition to polygons and lines) in the map component.
- Add a new
sizeparameter to the map component to set the size of markers. - Document the
heightparameter to customize the size of the map. tile_sourceparameter to customize the map tiles, giving completely free control over the map appearance.attributionparameter to customize or remove the small copyright information text box at the bottom of the map.
- Add the ability to customize top navigation links and to create submenus in the
shellcomponent.- Postgres example:
select 'shell' as component, 'SQLPage' as title, JSON('{ "link":"/", "title":"Home" }') as menu_item, JSON('{ "title":"Options", "submenu":[ {"link":"1.sql","title":"Page 1"}, {"link":"2.sql","title":"Page 2"} ]}') as menu_item;
- Updated the embedded database to SQLite 3.44, which improves performance, compatibility with other databases, and brings new date formatting functions. The new
ORDER BYclause in aggregate functions is not supported yet in SQLPage.
v0.15.1
SQLPage is a small web server that renders your SQL queries as beautiful interactive websites. This releases brings exciting features that should make development even easier, faster, and more secure. Let's dive into the exciting innovations of version 0.15.1:
What's new ?
Forms
- Many improvements in the
formcomponent- Multiple form fields can now be aligned on the same line using the
widthattribute. - A reset button can now be added to the form using the
resettop-level attribute. - The submit button can now be customized, and can be removed completely, which is useful to create multiple submit buttons that submit the form to different targets.
- Multiple form fields can now be aligned on the same line using the
- Support form submission using the button component using its new
formproperty. This allows you to create a form with multiple submit buttons that submit the form to different targets.
Maps
- Custom icons and colors for markers in the map component.
- Add support for GeoJSON in the map component. This makes it much more generic and allows you to display any kind of geographic data, including areas, on a map very easily. This plays nicely with PostGIS and Spatialite which can return GeoJSON directly from SQL queries.
Bug fixes
- Support non-string values in markdown fields.
NULLvalues are now displayed as empty strings, numeric values are displayed as strings, booleans astrueorfalse, and arrays as lines of text. This avoids the need to cast values to strings in SQL queries. - Revert a change introduced in v0.15.0:
- Re-add the systematic
CAST(? AS TEXT)around variables, which helps the database know which type it is dealing with in advance. This fixes a regression in 0.15 where some SQLite websites were broken because of missing affinity information. In SQLite'1' = 1isfalsebutCAST('1' AS TEXT) = 1istrue. This also fixes error messages likecould not determine data type of parameter $1in PostgreSQL.
- Re-add the systematic
- Fix a bug where cookie removal set the cookie value to the empty string instead of removing the cookie completely.
v0.15.0
- New functions:
sqlpage.path(),sqlpage.variables()sqlpage.variables()makes it easier to process forms with a variable number of fields (for instance, when the form fields themselves are generated based on data from the database). See the online shop orders example.
- bug fixes
- improved documentation
- new
align_rightattribute in the table component
v0.15.0-beta.0
First beta-release for v0.15
v0.14.0
button component and time series plots
- Better support for time series in the chart component. You can now use the
timetop-attribute to display a time series chart
with smart x-axis labels. 
- New component: button. This allows you to create rows of buttons that allow navigation between pages.
- Better error messages for Microsoft SQL Server. SQLPage now displays the line number of the error, which is especially useful for debugging long migration scripts.
- Many improvements in the official website and the documentation.
- Most notably, the documentation now has syntax highlighting on code blocks (using prism with a custom theme made for tabler). This also illustrates the usage of external javascript and css libraries in SQLPage. See the shell component documentation.
- Better display of example queries in the documentation, with smart indentation that makes it easier to read.
- Clarify some ambiguous error messages:
- make it clearer whether the error comes from SQLPage or from the database
- specific tokenization errors are now displayed as such
v0.13.0
v0.13.0: beautiful timelines and scatter plots
- New timeline component to display a timeline of events.
- Add support for scatter and bubble plots in the chart component. See the chart documentation.
- further improve debuggability with more precise error messages. In particular, it used to be hard to debug errors in long migration scripts, because the line number and position was not displayed. This is now fixed.
- Better logs on 404 errors. SQLPage used to log a message without the path of the file that was not found. This made it hard to debug 404 errors. This is now fixed.
- Add a new
top_imageattribute to the card component to display an image at the top of the card. This makes it possible to create beautiful image galleries with SQLPage. - Updated dependencies, for bug fixes and performance improvements.
- New icons (see https://tabler-icons.io/changelog)
- When
NULLis passed as an icon name, display no icon instead of raising an error. - Official docker image folder structure changed. The docker image now expects
- the SQLPage website (
.sqlfiles) to be in/var/www/, and - the SQLPage configuration folder to be in
/etc/sqlpage/ - the configuration file should be in
/etc/sqlpage/sqlpage.json - the database file should be in
/etc/sqlpage/sqlpage.db - custom templates should be in
/etc/sqlpage/templates/ - This configuration change concerns only the docker image. If you are using the sqlpage binary directly, nothing changes.
- the SQLPage website (
Full Changelog: v0.12.0...v0.13.0
v0.12.0
SQLPage Release Notes - Version 0.12.0 🚀
SQLPage is a small web server that renders your SQL queries as beautiful interactive websites. This releases brings exciting features that should make development even easier, faster, and more secure. Let's dive into the exciting innovations of version 0.12.0:
🧮 Variable Support
SQLPage now empowers you with the ability to set and reuse variables between SQL statements. This dynamic feature allows you to craft more complex SQL queries and reuse query results across multiple places in your code. Here's a sneak peek:
-- Set a variable
SET person = (SELECT username FROM users WHERE id = $id);
-- Use it in a query
SELECT 'text' AS component, 'Hello ' || $person AS contents;🚀 Execute Server-Side Commands with sqlpage.exec
Introducing sqlpage.exec—a powerful function that lets you execute commands on the server. This opens up a world of possibilities, from making external API calls to sending emails and running custom code on the server. Be creative, but remember that with great power comes great responsibility !
SELECT 'card' AS component;
SELECT
value->>'name' AS title,
value->>'email' AS description
FROM json_each(sqlpage.exec('curl', 'https://jsonplaceholder.typicode.com/users'));🛡️ Security
For your security, the sqlpage.exec function is disabled by default. To enable it, simply set the allow_exec configuration parameter to true in the configuration. Please use caution, as enabling this function grants significant server access to anyone who can write SQL queries on your website.
🍔 Menu Items Made Easy
Configuring multiple menu items has never been simpler. Now, syntax like
SELECT 'shell' AS component, '["page 1", "page 2"]' AS menu_itemworks as expected. See
- the shell component documentation
- the small SQL game example
- and join the discussion here.
🛠️ Database Connection Setup: on_connect.sql
Create the sqlpage/on_connect.sql file to run a SQL script on each database connection before it's used. This versatile feature enables you to customize your database connection with settings like PRAGMA in SQLite, custom variables in PostgreSQL, and more. Explore the endless possibilities!
🚧 Improved Error Handling
Experience more precise and informative error messages with SQLPage. When an error occurs, you'll now receive detailed error positions within the SQL statement. Say goodbye to vague error messages and welcome efficient debugging.
📟 ARM: Hello, Raspberry Pi and Mac M1 Users!
SQLPage now distributes Docker images for ARM architecture, expanding your possibilities for deployment. Whether you're using a Raspberry Pi or a Mac M1, SQLPage is ready to power your projects!
🔒 Enhanced Security by Default
To enhance security, SQLPage now creates the default SQLite database file in the "sqlpage" config directory, making it inaccessible from the web by default. For those who prefer the previous behavior, simply set the database_url configuration parameter to sqlite://sqlpage.db in your configuration.
📜 Empty List Customization
Tailor your list components with precision using the new empty_title, empty_description, and empty_link top-level attributes in the list component. Now you have full control over the text displayed when your list is empty.
🔒 Asynchronous Password Hashing for Enhanced Performance and Security
Say goodbye to request processing bottlenecks! SQLPage used to block a request processing thread while hashing passwords, potentially leaving your site vulnerable to denial of service attacks. Not anymore! SQLPage now launches password hashing operations on a separate thread pool, allowing your application to handle other requests while efficiently hashing passwords.
🔗 URL Parameter Encoding
Introducing sqlpage.url_encode! This function simplifies URL parameter encoding, making it a breeze to create dynamic URLs in your web application.
SELECT 'card' AS component; SELECT 'More...' AS title, 'advanced_search.sql?query=' || sqlpage.url_encode($query)Upgrade
Upgrade to SQLPage 0.12.0 and elevate your web development game to new heights. We're committed to providing you with the tools and features you need for a seamless, efficient, and secure coding experience.
Get Started with SQLPage | GitHub Repository
Unleash your creativity, streamline your development, and craft extraordinary SQL-driven web applications with SQLPage 0.12.0. Happy coding! 💻🚀
v0.12.0-beta4
Better error messages
v0.12.0-beta3
new feature: sqlpage/on_connect.sql to run sql statements at the begi…
v0.12.0-beta2
Beta 2, fixes bugs with non-string variables and introduces sqlpage.exec




