SQLPage v0.46.0
This release makes SQLPage applications more reliable across databases, adds new SQL-driven UI components, improves charts and forms, and updates AWS Lambda support.
Highlights
Build richer interfaces
New toast notifications
The new toast component lets you show success messages, warnings, errors, and background status updates without writing custom JavaScript.
Toasts support:
- Plain text or Markdown content
- Icons and colors
- Six screen positions
- Automatic or manual dismissal
- URL-fragment triggers
- Queued notifications that stack automatically
select
'toast' as component,
'Saved successfully' as title,
'Your changes are now live.' as description,
'check' as icon,
'green' as color;Use duration = 0 for persistent messages, or trigger to show a notification after a user clicks a link or button.
New SQL-generated filters
The new facet component makes it easy to add category, status, owner, or tag filters to tables, lists, and cards.
Facets can appear as inline links or as a compact dropdown, with optional “All” links and configurable labels.
select 'facet' as component, 'Status' as description;
select
'Open' as title,
'?status=open' as link,
$status = 'open' as active;The component creates the navigation; your SQL query remains responsible for applying the selected filter. Because the filters use URLs, users can bookmark and share filtered views.
Richer email messages
sqlpage.send_mail now supports HTML and Markdown email bodies.
set result = sqlpage.send_mail(json_object(
'to', :email,
'subject', 'Welcome',
'body_md', '# Welcome\n\nThanks for **signing up**!'
));With body_md, SQLPage sends both:
- A plain-text alternative containing the Markdown
- An HTML alternative rendered from the Markdown
You can also provide body_html alongside a plain-text body. body_md and body_html cannot be combined.
More accurate and expressive charts
The chart component gains several improvements.
Add thresholds, targets, and time ranges
Charts can now display reference lines and bands:
select
80 as yline,
'Target' as label,
'orange' as color;
select
100 as yline,
120 as yline_end,
'Warning zone' as label,
'red' as color;Use yline for a horizontal reference, xline for an event or date on the x-axis, and yline_end or xline_end to create a band. Reference lines are ordinary query rows, so you can generate as many as needed.
They do not contribute to stacked totals and are not filled as part of an area chart. Their orientation follows the axis, so a yline becomes vertical on a horizontal bar chart.
Color individual data points
Rows can now supply their own color, allowing you to highlight a single bar, slice, point, or range:
select
label,
value,
case
when value > 90 then 'red'
else 'green'
end as color
from metrics;This works with bar, column, range bar, pie, treemap, scatter, and bubble charts, as well as line and area markers.
Correct alignment for uneven series
Stacked charts now match series by their x-values instead of by point order. Missing values no longer shift later points into the wrong position.
For unstacked line, area, scatter, bubble, and heatmap charts with text categories, series are aligned by label and leave a visible gap where a series has no value.
Other chart fixes include:
- Column charts now render vertical bars correctly.
- Unsupported
stackedsettings are safely ignored instead of producing an empty chart. - Tooltip titles inherit the tooltip’s text color.
Better database compatibility
SQLPage no longer unnecessarily casts request variables to text on PostgreSQL, MySQL/MariaDB, SQL Server, and DuckDB.
You can continue writing ordinary SQL:
select *
from users
where id = $id;The generated SQL is now cleaner—such as WHERE id = $1 instead of WHERE id = CAST($1 AS TEXT)—and the database can infer the appropriate type from context.
This fixes several real-world issues:
- SQL Server comparisons involving non-ASCII
nvarcharvalues - SQL Server
CONTAINSandEXECstatements using variables - MySQL/MariaDB variables in
LIMITandOFFSET
The explicit cast remains in place for SQLite and ODBC connections where it is needed for predictable comparisons. See the SQL extensions documentation for details.
More predictable forms, APIs, and maps
- Form
options_sourceURLs now retain their existing query parameters when SQLPage adds or updates the dynamicsearchparameter. - Searchable single-select fields close their dropdown after an option is chosen.
sqlpage.request_bodyandsqlpage.request_body_base64returnNULLwhen no request body was sent.- Body-reading failures, including payloads exceeding the configured limit, are now reported as errors instead of being silently treated as empty bodies.
- Invalid map coordinates are logged in the browser console and skipped, so one malformed point no longer breaks the entire map.
- Datagrid rows with icons or images no longer show an unnecessary en-dash placeholder. Explicitly empty descriptions remain empty.
Updated AWS Lambda support
Lambda builds now target the supported Amazon Linux 2023 custom runtime, provided.al2023, instead of Amazon Linux 2.
The deployment archive also includes the sqlpage configuration directory required because Lambda’s filesystem is read-only. Existing deployments should select provided.al2023 when upgrading. See SQLPage’s Lambda instructions and AWS’s OS-only runtime documentation.
Accessibility and developer experience
- Screen readers now announce modal titles instead of reporting an unnamed dialog. See the
modalcomponent. - List-valued configuration options—including OIDC paths and trusted audiences—can now be set through environment variables as space-separated lists. See the configuration reference.
- Documentation for
sqlpage.fetch_with_metanow correctly identifies JSON responses underjson_body, rather thanbody. - Recursive
sqlpage.run_sqlfailures now show one concise, correctly positioned error instead of repeating the entire inclusion chain. - The bundled Tabler icon sprite is updated from v3.44.0 to v3.46.0, adding 18 icons—including
play-bug,remote-control,tabs,vault, andyarn—along with upstream fixes.