diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2b75bdef..885f844f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,200 +1,212 @@
# CHANGELOG.md
## unreleased
- - fix: `sqlpage.variables()` now does not return json objects with duplicate keys when post, get and set variables of the same name are present. The semantics of the returned values remains the same (precedence: set > post > get).
+
+- **New Function**: `sqlpage.web_root()` - Returns the web root directory where SQLPage serves `.sql` files from. This is more reliable than `sqlpage.current_working_directory()` when you need to reference the location of your SQL files, especially when the `--web-root` argument or `WEB_ROOT` environment variable is used.
+- **New Function**: `sqlpage.configuration_directory()` - Returns the configuration directory where SQLPage looks for `sqlpage.json`, templates, and migrations. Useful when you need to reference configuration-related files in your SQL code.
+- fix: The default welcome page (`index.sql`) now correctly displays the web root and configuration directory paths instead of showing the current working directory.
+- fix: `sqlpage.variables()` now does not return json objects with duplicate keys when post, get and set variables of the same name are present. The semantics of the returned values remains the same (precedence: set > post > get).
- add support for some duckdb-specific (like `select {'a': 1, 'b': 2}`), and oracle-specific syntax dynamically when connected through odbc.
- better oidc support. Single-sign-on now works with sites:
- - using a non-default `site_prefix`
- - hosted behind an ssl-terminating reverse proxy
+- using a non-default `site_prefix`
+- hosted behind an ssl-terminating reverse proxy
## 0.41.0 (2025-12-28)
- - **New Function**: `sqlpage.oidc_logout_url(redirect_uri)` - Generates a secure logout URL for OIDC-authenticated users with support for [RP-Initiated Logout](https://openid.net/specs/openid-connect-rpinitiated-1_0.html#RPLogout)
- - Fix compatibility with Auth0 for OpenID-Connect authentification. See https://github.com/ramosbugs/openidconnect-rs/issues/23
- - updated sql parser: https://github.com/apache/datafusion-sqlparser-rs/blob/main/changelog/0.60.0.md
- - updated apexcharts to 5.3.6:
- - https://github.com/apexcharts/apexcharts.js/compare/v5.3.0...v5.3.6
- - https://github.com/apexcharts/apexcharts.js/releases/tag/v5.3.6
- - re-add the `lime` color option to charts
- - update default chart color palette; use [Open Colors](https://yeun.github.io/open-color/)
- -
- - re-enable text drop shadow in chart data labels
+
+- **New Function**: `sqlpage.oidc_logout_url(redirect_uri)` - Generates a secure logout URL for OIDC-authenticated users with support for [RP-Initiated Logout](https://openid.net/specs/openid-connect-rpinitiated-1_0.html#RPLogout)
+- Fix compatibility with Auth0 for OpenID-Connect authentification. See https://github.com/ramosbugs/openidconnect-rs/issues/23
+- updated sql parser: https://github.com/apache/datafusion-sqlparser-rs/blob/main/changelog/0.60.0.md
+- updated apexcharts to 5.3.6:
+ - https://github.com/apexcharts/apexcharts.js/compare/v5.3.0...v5.3.6
+ - https://github.com/apexcharts/apexcharts.js/releases/tag/v5.3.6
+- re-add the `lime` color option to charts
+- update default chart color palette; use [Open Colors](https://yeun.github.io/open-color/)
+ -
+- re-enable text drop shadow in chart data labels
## 0.40.0 (2025-11-28)
- - OIDC login redirects now use HTTP 303 responses so POST submissions are converted to safe GET requests before reaching the identity provider, fixing incorrect reuse of the original POST (HTTP 307) that could break standard auth flows.
- - SQLPage now respects [HTTP accept headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Accept) for JSON. You can now easily process the contents of any existing sql page programmatically with:
- - `curl -H "Accept: application/json" http://example.com/page.sql`: returns a json array
- - `curl -H "Accept: application/x-ndjson" http://example.com/page.sql`: returns one json object per line.
- - Fixed a bug in `sqlpage.link`: a link with no path (link to the current page) and no url parameter now works as expected. It used to keep the existing url parameters instead of removing them. `sqlpage.link('', '{}')` now returns `'?'` instead of the empty string.
- - `sqlpage.fetch(null)` and `sqlpage.fetch_with_meta(null)` now return `null` instead of throwing an error.
- - **New Function**: `sqlpage.set_variable(name, value)`
- - Returns a URL with the specified variable set to the given value, preserving other existing variables.
- - This is a shorthand for `sqlpage.link(sqlpage.path(), json_patch(sqlpage.variables('get'), json_object(name, value)))`.
- - **Variable System Improvements**: URL and POST parameters are now immutable, preventing accidental modification. User-defined variables created with `SET` remain mutable.
- - **BREAKING**: `$variable` no longer accesses POST parameters. Use `:variable` instead.
- - **What changed**: Previously, `$x` would return a POST parameter value if no GET parameter named `x` existed.
- - **Fix**: Replace `$x` with `:x` when you need to access form field values.
- - **Example**: Change `SELECT $username` to `SELECT :username` when reading form submissions.
- - **BREAKING**: `SET $name` no longer makes GET (URL) parameters inaccessible when a URL parameter with the same name exists.
- - **What changed**: `SET $name = 'value'` would previously overwrite the URL parameter `$name`. Now it creates an independent SET variable that shadows the URL parameter.
- - **Fix**: This is generally the desired behavior. If you need to access the original URL parameter after setting a variable with the same name, extract it from the JSON returned by `sqlpage.variables('get')`.
- - **Example**: If your URL is `page.sql?name=john`, and you do `SET $name = 'modified'`, then:
- - `$name` will be `'modified'` (the SET variable)
- - The original URL parameter is still preserved and accessible:
- - `sqlpage.variables('get')->>'name'` returns `'john'`
- - **New behavior**: Variable lookup now follows this precedence:
- - `$variable` checks SET variables first, then URL parameters
- - SET variables always shadow URL/POST parameters with the same name
- - **New sqlpage.variables() filters**:
- - `sqlpage.variables('get')` returns only URL parameters as JSON
- - `sqlpage.variables('post')` returns only POST parameters as JSON
- - `sqlpage.variables('set')` returns only user-defined SET variables as JSON
- - `sqlpage.variables()` returns all variables merged together, with SET variables taking precedence
- - **Deprecation warnings**: Using `$var` when both a URL parameter and POST parameter exist with the same name now shows a warning. In a future version, you'll need to explicitly choose between `$var` (URL) and `:var` (POST).
- - Improved performance of `sqlpage.run_sql`.
- - On a simple test that just runs 4 run_sql calls, the new version is about 2.7x faster (15,708 req/s vs 5,782 req/s) with lower latency (0.637 ms vs 1.730 ms per request).
- - add support for postgres range types
+
+- OIDC login redirects now use HTTP 303 responses so POST submissions are converted to safe GET requests before reaching the identity provider, fixing incorrect reuse of the original POST (HTTP 307) that could break standard auth flows.
+- SQLPage now respects [HTTP accept headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Accept) for JSON. You can now easily process the contents of any existing sql page programmatically with:
+ - `curl -H "Accept: application/json" http://example.com/page.sql`: returns a json array
+ - `curl -H "Accept: application/x-ndjson" http://example.com/page.sql`: returns one json object per line.
+- Fixed a bug in `sqlpage.link`: a link with no path (link to the current page) and no url parameter now works as expected. It used to keep the existing url parameters instead of removing them. `sqlpage.link('', '{}')` now returns `'?'` instead of the empty string.
+- `sqlpage.fetch(null)` and `sqlpage.fetch_with_meta(null)` now return `null` instead of throwing an error.
+- **New Function**: `sqlpage.set_variable(name, value)`
+ - Returns a URL with the specified variable set to the given value, preserving other existing variables.
+ - This is a shorthand for `sqlpage.link(sqlpage.path(), json_patch(sqlpage.variables('get'), json_object(name, value)))`.
+- **Variable System Improvements**: URL and POST parameters are now immutable, preventing accidental modification. User-defined variables created with `SET` remain mutable.
+ - **BREAKING**: `$variable` no longer accesses POST parameters. Use `:variable` instead.
+ - **What changed**: Previously, `$x` would return a POST parameter value if no GET parameter named `x` existed.
+ - **Fix**: Replace `$x` with `:x` when you need to access form field values.
+ - **Example**: Change `SELECT $username` to `SELECT :username` when reading form submissions.
+ - **BREAKING**: `SET $name` no longer makes GET (URL) parameters inaccessible when a URL parameter with the same name exists.
+ - **What changed**: `SET $name = 'value'` would previously overwrite the URL parameter `$name`. Now it creates an independent SET variable that shadows the URL parameter.
+ - **Fix**: This is generally the desired behavior. If you need to access the original URL parameter after setting a variable with the same name, extract it from the JSON returned by `sqlpage.variables('get')`.
+ - **Example**: If your URL is `page.sql?name=john`, and you do `SET $name = 'modified'`, then:
+ - `$name` will be `'modified'` (the SET variable)
+ - The original URL parameter is still preserved and accessible:
+ - `sqlpage.variables('get')->>'name'` returns `'john'`
+ - **New behavior**: Variable lookup now follows this precedence:
+ - `$variable` checks SET variables first, then URL parameters
+ - SET variables always shadow URL/POST parameters with the same name
+ - **New sqlpage.variables() filters**:
+ - `sqlpage.variables('get')` returns only URL parameters as JSON
+ - `sqlpage.variables('post')` returns only POST parameters as JSON
+ - `sqlpage.variables('set')` returns only user-defined SET variables as JSON
+ - `sqlpage.variables()` returns all variables merged together, with SET variables taking precedence
+ - **Deprecation warnings**: Using `$var` when both a URL parameter and POST parameter exist with the same name now shows a warning. In a future version, you'll need to explicitly choose between `$var` (URL) and `:var` (POST).
+- Improved performance of `sqlpage.run_sql`.
+ - On a simple test that just runs 4 run_sql calls, the new version is about 2.7x faster (15,708 req/s vs 5,782 req/s) with lower latency (0.637 ms vs 1.730 ms per request).
+- add support for postgres range types
## v0.39.1 (2025-11-08)
- - More precise server timing tracking to debug performance issues
- - Fix missing server timing header in some cases
- - Implement nice error messages for some header-related errors such as invalid header values.
- - `compress_responses` is now set to `false` by default in the configuration.
- - When response compression is enabled, additional buffering is needed. Users reported a better experience with pages that load more progressively, reducing the time before the pages' shell is rendered.
- - When SQLPage is deployed behind a reverse proxy, compressing responses between sqlpage and the proxy is wasteful.
- - In the table component, allow simple objects in custom_actions instead of requiring arrays of objects.
- - Fatser icon loading. Previously, even a page containing a single icon required downloading and parsing a ~2MB file. This resulted in a delay where pages initially appeared with a blank space before icons appeared. Icons are now inlined inside pages and appear instantaneously.
- - Updated tabler icons to 3.35
- - Fix inaccurate ODBC warnings
- - Added support for Microsoft SQL Server named instances: `mssql://user:pass@localhost/db?instance_name=xxx`
- - Added a detailed [performance guide](https://sql-page.com/blog?post=Performance+Guide) to the docs.
+
+- More precise server timing tracking to debug performance issues
+- Fix missing server timing header in some cases
+- Implement nice error messages for some header-related errors such as invalid header values.
+- `compress_responses` is now set to `false` by default in the configuration.
+- When response compression is enabled, additional buffering is needed. Users reported a better experience with pages that load more progressively, reducing the time before the pages' shell is rendered.
+- When SQLPage is deployed behind a reverse proxy, compressing responses between sqlpage and the proxy is wasteful.
+- In the table component, allow simple objects in custom_actions instead of requiring arrays of objects.
+- Fatser icon loading. Previously, even a page containing a single icon required downloading and parsing a ~2MB file. This resulted in a delay where pages initially appeared with a blank space before icons appeared. Icons are now inlined inside pages and appear instantaneously.
+- Updated tabler icons to 3.35
+- Fix inaccurate ODBC warnings
+- Added support for Microsoft SQL Server named instances: `mssql://user:pass@localhost/db?instance_name=xxx`
+- Added a detailed [performance guide](https://sql-page.com/blog?post=Performance+Guide) to the docs.
## v0.39.0 (2025-10-28)
- - Ability to execute sql for URL paths with another extension. If you create sitemap.xml.sql, it will be executed for example.com/sitemap.xml
- - Display source line info in errors even when the database does not return a precise error position. In this case, the entire problematic SQL statement is referenced.
- - The shell with a vertical sidebar can now have "active" elements, just like the horizontal header bar.
- - New `edit_url`, `delete_url`, and `custom_actions` properties in the [table](https://sql-page.com/component.sql?component=table) component to easily add nice icon buttons to a table.
- - SQLPage now sets the [`Server-Timing` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Server-Timing) in development. So when you have a page that loads slowly, you can open your browser's network inspector, click on the slow request, then open the timing tab to understand where it's spending its time.
- -
- - Fixed a memory corruption issue in the builtin odbc driver manager
- - ODBC: fix using globally installed system drivers by their name in debian-based linux distributions.
- - New [login](https://sql-page.com/component.sql?component=table) component.
+- Ability to execute sql for URL paths with another extension. If you create sitemap.xml.sql, it will be executed for example.com/sitemap.xml
+- Display source line info in errors even when the database does not return a precise error position. In this case, the entire problematic SQL statement is referenced.
+- The shell with a vertical sidebar can now have "active" elements, just like the horizontal header bar.
+- New `edit_url`, `delete_url`, and `custom_actions` properties in the [table](https://sql-page.com/component.sql?component=table) component to easily add nice icon buttons to a table.
+- SQLPage now sets the [`Server-Timing` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Server-Timing) in development. So when you have a page that loads slowly, you can open your browser's network inspector, click on the slow request, then open the timing tab to understand where it's spending its time.
+ -
+- Fixed a memory corruption issue in the builtin odbc driver manager
+- ODBC: fix using globally installed system drivers by their name in debian-based linux distributions.
+- New [login](https://sql-page.com/component.sql?component=table) component.
## v0.38.0
- - Added support for the Open Database Connectivity (ODBC) standard.
- - This makes SQLPage compatible with many new databases, including:
- - [*ClickHouse*](https://github.com/ClickHouse/clickhouse-odbc),
- - [*MongoDB*](https://www.mongodb.com/docs/atlas/data-federation/query/sql/drivers/odbc/connect),
- - [*DuckDB*](https://duckdb.org/docs/stable/clients/odbc/overview.html), and through it [many other data sources](https://duckdb.org/docs/stable/data/data_sources),
- - [*Oracle*](https://www.oracle.com/database/technologies/releasenote-odbc-ic.html),
- - [*Snowflake*](https://docs.snowflake.com/en/developer-guide/odbc/odbc),
- - [*BigQuery*](https://cloud.google.com/bigquery/docs/reference/odbc-jdbc-drivers),
- - [*IBM DB2*](https://www.ibm.com/support/pages/db2-odbc-cli-driver-download-and-installation-information),
- - [*Trino*](https://docs.starburst.io/clients/odbc/odbc-v2.html), and through it [many other data sources](https://trino.io/docs/current/connector.html)
- - Added a new `sqlpage.hmac()` function for cryptographic HMAC (Hash-based Message Authentication Code) operations.
- - Create and verify secure signatures for webhooks (Shopify, Stripe, GitHub, etc.)
- - Generate tamper-proof tokens for API authentication
- - Secure download links and temporary access codes
- - Supports SHA-256 (default) and SHA-512 algorithms
- - Output formats: hexadecimal (default) or base64 (e.g., `sha256-base64`)
- - See the [function documentation](https://sql-page.com/functions.sql?function=hmac) for detailed examples
- - Fixed a slight spacing issue in the list components empty value display.
- - Improved performance of setting a variable to a literal value. `SET x = 'hello'` is now executed locally by SQLPage and does not send anything to the database. This completely removes the cost of extracting static values into variables for cleaner SQL files.
- - Enable arbitrary precision in the internal representation of numbers. This guarantees zero precision loss when the database returns very large or very small DECIMAL or NUMERIC values.
+
+- Added support for the Open Database Connectivity (ODBC) standard.
+ - This makes SQLPage compatible with many new databases, including:
+ - [_ClickHouse_](https://github.com/ClickHouse/clickhouse-odbc),
+ - [_MongoDB_](https://www.mongodb.com/docs/atlas/data-federation/query/sql/drivers/odbc/connect),
+ - [_DuckDB_](https://duckdb.org/docs/stable/clients/odbc/overview.html), and through it [many other data sources](https://duckdb.org/docs/stable/data/data_sources),
+ - [_Oracle_](https://www.oracle.com/database/technologies/releasenote-odbc-ic.html),
+ - [_Snowflake_](https://docs.snowflake.com/en/developer-guide/odbc/odbc),
+ - [_BigQuery_](https://cloud.google.com/bigquery/docs/reference/odbc-jdbc-drivers),
+ - [_IBM DB2_](https://www.ibm.com/support/pages/db2-odbc-cli-driver-download-and-installation-information),
+ - [_Trino_](https://docs.starburst.io/clients/odbc/odbc-v2.html), and through it [many other data sources](https://trino.io/docs/current/connector.html)
+- Added a new `sqlpage.hmac()` function for cryptographic HMAC (Hash-based Message Authentication Code) operations.
+ - Create and verify secure signatures for webhooks (Shopify, Stripe, GitHub, etc.)
+ - Generate tamper-proof tokens for API authentication
+ - Secure download links and temporary access codes
+ - Supports SHA-256 (default) and SHA-512 algorithms
+ - Output formats: hexadecimal (default) or base64 (e.g., `sha256-base64`)
+ - See the [function documentation](https://sql-page.com/functions.sql?function=hmac) for detailed examples
+- Fixed a slight spacing issue in the list components empty value display.
+- Improved performance of setting a variable to a literal value. `SET x = 'hello'` is now executed locally by SQLPage and does not send anything to the database. This completely removes the cost of extracting static values into variables for cleaner SQL files.
+- Enable arbitrary precision in the internal representation of numbers. This guarantees zero precision loss when the database returns very large or very small DECIMAL or NUMERIC values.
## v0.37.1
- - fixed decoding of UUID values
- - Fixed handling of NULL values in `sqlpage.link`. They were encoded as the string `'null'` instead of being omitted from the link's parameters.
- - Enable submenu autoclosing (on click) in the shell. This is not ideal, but this prevents a bug introduced in v0.36.0 where the page would scroll back to the top when clicking anywhere on the page after navigating from a submenu. The next version will fix this properly. See https://github.com/sqlpage/SQLPage/issues/1011
- - Adopt the new nice visual errors introduced in v0.37.1 for "403 Forbidden" and "429 Too Many Requests" errors.
- - Fix a bug in oidc login flows. When two tabs in the same browser initiated a login at the same time, an infinite redirect loop could be triggered. This mainly occured when restoring open tabs after a period of inactivity, often in mobile browsers.
- - Multiple small sql parser improvements.
- - Adds support for MERGE queries inside CTEs, and MERGE queries with a RETURNING clause.
- - https://github.com/apache/datafusion-sqlparser-rs/blob/main/changelog/0.59.0.md
+
+- fixed decoding of UUID values
+- Fixed handling of NULL values in `sqlpage.link`. They were encoded as the string `'null'` instead of being omitted from the link's parameters.
+- Enable submenu autoclosing (on click) in the shell. This is not ideal, but this prevents a bug introduced in v0.36.0 where the page would scroll back to the top when clicking anywhere on the page after navigating from a submenu. The next version will fix this properly. See https://github.com/sqlpage/SQLPage/issues/1011
+- Adopt the new nice visual errors introduced in v0.37.1 for "403 Forbidden" and "429 Too Many Requests" errors.
+- Fix a bug in oidc login flows. When two tabs in the same browser initiated a login at the same time, an infinite redirect loop could be triggered. This mainly occured when restoring open tabs after a period of inactivity, often in mobile browsers.
+- Multiple small sql parser improvements.
+ - Adds support for MERGE queries inside CTEs, and MERGE queries with a RETURNING clause.
+ - https://github.com/apache/datafusion-sqlparser-rs/blob/main/changelog/0.59.0.md
## v0.37.0
- - We now cryptographically sign the Windows app during releases, which proves the file hasn’t been tampered with. Once the production certificate is active, Windows will show a "verified publisher" and should stop showing screens saying "This app might harm your device", "Windows protected your PC" or "Are you sure you want to run this application ?".
- - Thanks to https://signpath.io for providing us with a windows signing certificate !
- - Added a new parameter `encoding` to the [fetch](https://sql-page.com/functions.sql?function=fetch) function:
- - All [standard web encodings](https://encoding.spec.whatwg.org/#concept-encoding-get) are supported.
- - Additionally, `base64` can be specified to decode binary data as base64 (compatible with [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs))
- - By default, the old behavior of the `fetch_with_meta` function is preserved: the response body is decoded as `utf-8` if possible, otherwise the response is encoded in `base64`.
- - Added a specific warning when a URL parameter and a form field have the same name. The previous general warning about referencing form fields with the `$var` syntax was confusing in that case.
- - [modal](https://sql-page.com/component.sql?component=modal) component: allow opening modals with a simple link.
- - This allows you to trigger modals from any other component, including tables, maps, forms, lists and more.
- - Since modals have their own url inside the page, you can now link to a modal from another page, and if you refresh a page while the modal is open, the modal will stay open.
- - modals now have an `open` parameter to open the modal automatically when the page is loaded.
- - New [download](https://sql-page.com/component.sql?component=download) component to let the user download files. The files may be stored as BLOBs in the database, local files on the server, or may be fetched from a different server.
- - **Enhanced BLOB Support**. You can now return binary data (BLOBs) directly to sqlpage, and it will automatically convert them to data URLs. This allows you to use database BLOBs directly wherever a link is expected, including in the new download component.
- - supports columns of type `BYTEA` (PostgreSQL), `BLOB` (MySQL, SQLite), `VARBINARY` and `IMAGE` (mssql)
- - Automatic detection of common file types based on magic bytes
- - This means you can use a BLOB wherever an image url is expected. For instance:
- ```sql
- select 'list' as component;
- select username as title, avatar_blob as image_url
- from users;
- ```
- - When a sql file is saved with the wrong character encoding (not UTF8), SQLPage now displays a helpful error messages that points to exactly where in the file the problem is.
- - More visual error messages: errors that occured before (such as file access issues) used to generate plain text messages that looked scary to non-technical users. All errors are now displayed nicely in the browser.
- - The form component now considers numbers and their string representation as equal when comparing the `value` parameter and the values from the `options` parameter in dropdowns. This makes it easier to use variables (which are always strings) in the value parameter in order to preserve a dropdown field value across page reloads. The following is now valid:
- - ```sql
- select 'form' as component;
- select
- 'select' as type,
- true as create_new,
- true as dropdown,
- '2' as value, -- passed as text even if the option values are passed as integers
- '[{"label": "A", "value": 1}, {"label": "B", "value": 2}]' as options;
- ```
+
+- We now cryptographically sign the Windows app during releases, which proves the file hasn’t been tampered with. Once the production certificate is active, Windows will show a "verified publisher" and should stop showing screens saying "This app might harm your device", "Windows protected your PC" or "Are you sure you want to run this application ?".
+ - Thanks to https://signpath.io for providing us with a windows signing certificate !
+- Added a new parameter `encoding` to the [fetch](https://sql-page.com/functions.sql?function=fetch) function:
+- All [standard web encodings](https://encoding.spec.whatwg.org/#concept-encoding-get) are supported.
+- Additionally, `base64` can be specified to decode binary data as base64 (compatible with [data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs))
+- By default, the old behavior of the `fetch_with_meta` function is preserved: the response body is decoded as `utf-8` if possible, otherwise the response is encoded in `base64`.
+- Added a specific warning when a URL parameter and a form field have the same name. The previous general warning about referencing form fields with the `$var` syntax was confusing in that case.
+- [modal](https://sql-page.com/component.sql?component=modal) component: allow opening modals with a simple link.
+ - This allows you to trigger modals from any other component, including tables, maps, forms, lists and more.
+ - Since modals have their own url inside the page, you can now link to a modal from another page, and if you refresh a page while the modal is open, the modal will stay open.
+ - modals now have an `open` parameter to open the modal automatically when the page is loaded.
+- New [download](https://sql-page.com/component.sql?component=download) component to let the user download files. The files may be stored as BLOBs in the database, local files on the server, or may be fetched from a different server.
+- **Enhanced BLOB Support**. You can now return binary data (BLOBs) directly to sqlpage, and it will automatically convert them to data URLs. This allows you to use database BLOBs directly wherever a link is expected, including in the new download component.
+ - supports columns of type `BYTEA` (PostgreSQL), `BLOB` (MySQL, SQLite), `VARBINARY` and `IMAGE` (mssql)
+ - Automatic detection of common file types based on magic bytes
+ - This means you can use a BLOB wherever an image url is expected. For instance:
+ ```sql
+ select 'list' as component;
+ select username as title, avatar_blob as image_url
+ from users;
+ ```
+- When a sql file is saved with the wrong character encoding (not UTF8), SQLPage now displays a helpful error messages that points to exactly where in the file the problem is.
+- More visual error messages: errors that occured before (such as file access issues) used to generate plain text messages that looked scary to non-technical users. All errors are now displayed nicely in the browser.
+- The form component now considers numbers and their string representation as equal when comparing the `value` parameter and the values from the `options` parameter in dropdowns. This makes it easier to use variables (which are always strings) in the value parameter in order to preserve a dropdown field value across page reloads. The following is now valid:
+ - ```sql
+ select 'form' as component;
+ select
+ 'select' as type,
+ true as create_new,
+ true as dropdown,
+ '2' as value, -- passed as text even if the option values are passed as integers
+ '[{"label": "A", "value": 1}, {"label": "B", "value": 2}]' as options;
+ ```
## v0.36.1
- - Fix regression introduced in v0.36.0: PostgreSQL money values showed as 0.0
- - The recommended way to display money values in postgres is still to format them in the way you expect in SQL. See https://github.com/sqlpage/SQLPage/issues/983
- - updated dependencies
+
+- Fix regression introduced in v0.36.0: PostgreSQL money values showed as 0.0
+ - The recommended way to display money values in postgres is still to format them in the way you expect in SQL. See https://github.com/sqlpage/SQLPage/issues/983
+- updated dependencies
## v0.36.0
- - added support for the MONEY and SMALLMONEY types in MSSQL.
- - include [math functions](https://sqlite.org/lang_mathfunc.html) in the builtin sqlite3 database.
- - the sqlpage binary can now help you create new empty migration files from the command line:
- ```
- ❯ ./sqlpage create-migration my_new_table
- Migration file created: sqlpage/migrations/20250627095944_my_new_table.sql
- ```
- - New [modal](https://sql-page.com/component.sql?component=modal) component
- - In bar charts: Sort chart categories by name instead of first appearance. This is useful when displaying cumulative bar charts with some series missing data for some x values.
- - Updated tabler to v1.4 https://github.com/tabler/tabler/releases/tag/%40tabler%2Fcore%401.4.0
- - Updated tabler-icons to v3.34 (19 new icons) https://tabler.io/changelog#/changelog/tabler-icons-3.34
- - Added support for partially private sites when using OIDC single sign-on:
- - The same SQLPage application can now have both publicly accessible and private pages accessible to users authenticated with SSO.
- - This allows easily creating a "log in page" that redirects to the OIDC provider.
- - See the [configuration](./configuration.md) for `oidc_protected_paths`
+
+- added support for the MONEY and SMALLMONEY types in MSSQL.
+- include [math functions](https://sqlite.org/lang_mathfunc.html) in the builtin sqlite3 database.
+- the sqlpage binary can now help you create new empty migration files from the command line:
+ ```
+ ❯ ./sqlpage create-migration my_new_table
+ Migration file created: sqlpage/migrations/20250627095944_my_new_table.sql
+ ```
+- New [modal](https://sql-page.com/component.sql?component=modal) component
+- In bar charts: Sort chart categories by name instead of first appearance. This is useful when displaying cumulative bar charts with some series missing data for some x values.
+- Updated tabler to v1.4 https://github.com/tabler/tabler/releases/tag/%40tabler%2Fcore%401.4.0
+- Updated tabler-icons to v3.34 (19 new icons) https://tabler.io/changelog#/changelog/tabler-icons-3.34
+- Added support for partially private sites when using OIDC single sign-on:
+ - The same SQLPage application can now have both publicly accessible and private pages accessible to users authenticated with SSO.
+ - This allows easily creating a "log in page" that redirects to the OIDC provider.
+ - See the [configuration](./configuration.md) for `oidc_protected_paths`
- Chart component: accept numerical values passed as strings in pie charts.
-- updated sql parser: [v0.57](https://github.com/apache/datafusion-sqlparser-rs/blob/main/changelog/0.57.0.md) [v0.58](https://github.com/apache/datafusion-sqlparser-rs/blob/main/changelog/0.58.0.md)
- * **Postgres text search types**: allows `tsquery` and `tsvector` data types
+- updated sql parser: [v0.57](https://github.com/apache/datafusion-sqlparser-rs/blob/main/changelog/0.57.0.md) [v0.58](https://github.com/apache/datafusion-sqlparser-rs/blob/main/changelog/0.58.0.md)
+ - **Postgres text search types**: allows `tsquery` and `tsvector` data types
```sql
SELECT 'OpenAI'::text @@ 'open:*'::tsquery;
```
- * **LIMIT in subqueries**: fixes parsing of `LIMIT` inside subselects
+ - **LIMIT in subqueries**: fixes parsing of `LIMIT` inside subselects
```sql
SELECT id FROM (SELECT id FROM users ORDER BY id LIMIT 5) AS sub;
```
- * **MySQL `MEMBER OF`**: JSON array membership test
+ - **MySQL `MEMBER OF`**: JSON array membership test
```sql
SELECT 17 MEMBER OF('[23, "abc", 17, "ab", 10]')
```
- * **Join precedence fix**: corrects interpretation of mixed `JOIN` types without join conditions
+ - **Join precedence fix**: corrects interpretation of mixed `JOIN` types without join conditions
```sql
SELECT * FROM t1 NATURAL JOIN t2
```
- * **Unicode identifiers**: allows non‑ASCII names in MySQL/Postgres/SQLite
+ - **Unicode identifiers**: allows non‑ASCII names in MySQL/Postgres/SQLite
```sql
SELECT 用户 AS chinese_name FROM accounts;
```
- * **Regex and `LIKE` operator fixes**: allow using `~` and `LIKE` with arrays
+ - **Regex and `LIKE` operator fixes**: allow using `~` and `LIKE` with arrays
```sql
select a ~ any(array['x']);
```
- * MSSQL output and default keywords in `EXEC` statements
+ - MSSQL output and default keywords in `EXEC` statements
```sql
EXECUTE dbo.proc1 DEFAULT
```
@@ -204,50 +216,54 @@
- A bug that caused SSO logins to fail over time has been fixed. The issue occurred because identity providers regularly rotate their security keys, but SQLPage previously only fetched them at startup. The application now automatically refreshes this provider metadata periodically and after login errors, ensuring stable authentication without requiring manual restarts.
## v0.35.2
- - Fix a bug with zero values being displayed with a non-zero height in stacked bar charts.
- - Updated dependencies, including the embedded SQLite database.
- - Release binaries are now dynamically linked again, but use GLIBC 2.28 ([released in 2018](https://sourceware.org/glibc/wiki/Glibc%20Timeline)), with is compatible with older linux distributions.
- - fixes an issue introduced in 0.35 where custom SQLite extension loading would not work.
- - When an user requests a page that does not exist (and the site owner did not provide a custom 404.sql file), we now serve a nice visual 404 web page instead of the ugly textual message and the verbose log messages we used to have.
- - 
- - still returns plain text 404 for non-HTML requests
- - Rich text editor: implement a readonly mode, activated when the field is not editable
- - [chart](https://sql-page.com/component.sql?component=chart): remove automatic sorting of categories. Values are now displayed in the order they are returned by the query.
+
+- Fix a bug with zero values being displayed with a non-zero height in stacked bar charts.
+- Updated dependencies, including the embedded SQLite database.
+- Release binaries are now dynamically linked again, but use GLIBC 2.28 ([released in 2018](https://sourceware.org/glibc/wiki/Glibc%20Timeline)), with is compatible with older linux distributions.
+- fixes an issue introduced in 0.35 where custom SQLite extension loading would not work.
+- When an user requests a page that does not exist (and the site owner did not provide a custom 404.sql file), we now serve a nice visual 404 web page instead of the ugly textual message and the verbose log messages we used to have.
+ - 
+ - still returns plain text 404 for non-HTML requests
+- Rich text editor: implement a readonly mode, activated when the field is not editable
+- [chart](https://sql-page.com/component.sql?component=chart): remove automatic sorting of categories. Values are now displayed in the order they are returned by the query.
## v0.35.1
- - improve color palette for charts
- - Fix some color names not working in the datagrid component
+
+- improve color palette for charts
+- Fix some color names not working in the datagrid component
## v0.35
- - Add support for [single sign-on using OIDC](sql-page.com/sso)
- - Allows protecting access to your website using "Sign in with Google/Microsoft/..."
- - Fix tooltips not showing on line charts with one or more hidden series
- - Update default chart colors and text shadows for better readability with all themes
- - Optimize memory layout by boxing large structs. Slightly reduces memory usage.
- - New example: [Rich text editor](./examples/rich-text-editor/). Let your users safely write formatted text with links and images.
- - Update the Tabler CSS library to [v1.3](https://tabler.io/changelog#/changelog/tabler-1.3). This fixes issues with
- - the alignment inside chart tooltips
- - the display of lists
- - update to [tabler incons v1.33](https://tabler.io/changelog#/changelog/tabler-icons-3.33) with many new icons.
- - Add an `active` top-level parameter to the shell component to highlight one of the top bar menu items. Thanks to @andrewsinnovations !
- - Make the [Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) customization more flexible, allowing you to harden the default security rules. Thanks to @guspower !
+
+- Add support for [single sign-on using OIDC](sql-page.com/sso)
+ - Allows protecting access to your website using "Sign in with Google/Microsoft/..."
+- Fix tooltips not showing on line charts with one or more hidden series
+- Update default chart colors and text shadows for better readability with all themes
+- Optimize memory layout by boxing large structs. Slightly reduces memory usage.
+- New example: [Rich text editor](./examples/rich-text-editor/). Let your users safely write formatted text with links and images.
+- Update the Tabler CSS library to [v1.3](https://tabler.io/changelog#/changelog/tabler-1.3). This fixes issues with
+ - the alignment inside chart tooltips
+ - the display of lists
+ - update to [tabler incons v1.33](https://tabler.io/changelog#/changelog/tabler-icons-3.33) with many new icons.
+- Add an `active` top-level parameter to the shell component to highlight one of the top bar menu items. Thanks to @andrewsinnovations !
+- Make the [Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) customization more flexible, allowing you to harden the default security rules. Thanks to @guspower !
- Fix vertically truncated text in the list component on empty descriptions.
- 
- - Updated sqlparser to [v0.56](https://github.com/apache/datafusion-sqlparser-rs/blob/main/changelog/0.56.0.md), with many improvements including:
- - Add support for the xmltable(...) function in postgres
- - Add support for MSSQL IF/ELSE statements.
- - Added four optional properties to the `big_number` component:
- - title_link (string): the URL or path that the Big Number’s title should link to, if any
- - title_link_new_tab (bool): how the title link is opened
- - value_link (string): the URL or path that the Big Number’s value should link to, if any
- - value_link_new_tab (bool): open the link in a new tab
- - Add support for nice "switch" checkboxes in the form component using `'switch' as type`
- - Add support for headers in the form component using
- - Release binaries are statically linked on linux
+- Updated sqlparser to [v0.56](https://github.com/apache/datafusion-sqlparser-rs/blob/main/changelog/0.56.0.md), with many improvements including:
+- Add support for the xmltable(...) function in postgres
+- Add support for MSSQL IF/ELSE statements.
+- Added four optional properties to the `big_number` component:
+ - title_link (string): the URL or path that the Big Number’s title should link to, if any
+ - title_link_new_tab (bool): how the title link is opened
+ - value_link (string): the URL or path that the Big Number’s value should link to, if any
+ - value_link_new_tab (bool): open the link in a new tab
+- Add support for nice "switch" checkboxes in the form component using `'switch' as type`
+- Add support for headers in the form component using
+- Release binaries are statically linked on linux
## v0.34 (2025-03-23)
### ✨ Top Features at a Glance
+
- **Safer deletion flows** in lists
- **Better table styling control** with CSS updates
- **Right-to-Left language support**
@@ -255,39 +271,50 @@
- **Sticky table footers** for better data presentation
### 🔒 Security First
+
#### **POST-based Deletions**
+
List component's `delete_link` now uses secure POST requests:
+
```sql
SELECT 'list' AS component;
SELECT 'Delete me' AS title, 'delete_item.sql?id=77' AS delete_link;
```
-*Prevents accidental deletions by web crawlers and follows REST best practices*
+
+_Prevents accidental deletions by web crawlers and follows REST best practices_
#### **Protected Internal Files**
+
- Files/folders starting with `.` (e.g., `.utils/`) are now inaccessible
- Perfect for internal scripts used with `sqlpage.run_sql()`
### 🎨 UI & Component Upgrades
+
#### **Table Styling Revolution**
+
```css
/* Before: .price | After: */
._col_price {
- background: #f8f9fa;
- border-right: 2px solid #dee2e6;
+ background: #f8f9fa;
+ border-right: 2px solid #dee2e6;
}
```
+
- New CSS class pattern: `._col_{column_name}`
- Fixes [#830](https://github.com/sqlpage/SQLPage/issues/830)
#### **Column component**
+
```sql
SELECT 'columns' AS component;
SELECT 'View details' AS title; -- No button shown
```
+
- Columns without button text now hide empty buttons
- Cleaner interfaces by default
#### **Sticky Table Footers**
+
```sql
SELECT
'table' AS component,
@@ -297,19 +324,25 @@ SELECT
SUM(price) AS value,
true AS _sqlpage_footer;
```
+
- Keep summary rows visible during scroll
- Use `_sqlpage_footer` on your final data row
### 🌍 Internationalization
+
#### **Right-to-Left Support**
+
```sql
SELECT 'shell' AS component, true AS rtl;
```
+
- Enable RTL mode per page via shell component
- Perfect for Arabic, Hebrew, and Persian content
### 📝 Content Handling
+
#### **Rich Text Power**
+
```sql
SELECT 'text' AS component,
'