Skip to content

v0.37.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 05 Sep 19:38
d8106e8

SQLPage v0.37 released !

Note

SQLPage lets you build web applications using SQL queries. If you know SQL, you can create complete web applications quickly.
Download for Windows, MacOS, or Linux, or try online !

Main changes: Windows app is now cryptographically signed for verified installs, plus new download component, enhanced BLOB support, smarter modals, and improved error handling.

Release Notes

Main changes: Windows app is now cryptographically signed for verified installs, plus new download component, enhanced BLOB support, smarter modals, and improved error handling. More details below.

🔐 Windows App Signing

  • sqlpage.exe is now cryptographically signed during releases.

  • This ensures files haven’t been tampered with and improves trust.

  • Windows will display “Verified Publisher” and you should no longer see warnings like:

    • “This app might harm your device”
    • “Windows protected your PC”
    • “Are you sure you want to run this application?”
  • Thanks to SignPath for providing the signing certificate!


🆕 New encoding Parameter in fetch

  • Supports all standard web encodings: spec reference

  • Added base64 decoding support, compatible with Data URIs.

  • Default behavior matches fetch_with_meta

    • Response is decoded as UTF-8 if possible
    • Falls back to base64 otherwise.

⚠️ Better variable conflict Warnings

  • If a URL parameter and a form field share the same name, SQLPage now shows a specific warning.
  • For backwards compatibility with older versions, SQLPage still allows accessing form field values (POST variables) using the $var syntax (instead of :var). This legacy behavior will be removed in the near future; you should monitor your application logs for warnings to ensure your app won't break when updating to the next version.

🪟 Modal Component Improvements

  • Modals can now be opened with a simple link.
  • Works from tables, maps, forms, lists, and more.
  • You can link directly to modals from other pages.
  • If you refresh a page while a modal is open, it stays open.
  • New open parameter to automatically open a modal on page load.

Example

select 
    'modal'                 as component,
    'my_modal'  as id,
    'Hello !' as title,
    '/my_modal_contents.sql' as embed;

select 'text' as component, 'Open [my modal](#my_modal)' as contents_md;

📥 New Header Component: download

  • Lets users download files directly from:

    • Database BLOBs
    • Local files on the server
    • External servers via fetch

🖼️ Enhanced BLOB Support

  • SQLPage now returns binary data (BLOBs) as data URLs automatically.

  • You can use BLOBs anywhere a URL is expected, including the new download component.

  • Supported types:

    • BYTEA (PostgreSQL)
    • BLOB (MySQL, SQLite)
    • VARBINARY, IMAGE (SQL Server)
  • Automatic detection of common file types via magic bytes.

  • Example: use BLOBs directly for user avatars:

    select 'list' as component;
    select username as title, avatar_blob as image_url from users;

For large files, it's still not recommended to store them directly in your database as BLOBs, for performance reasons.


📄 Better Character Encoding Errors

  • If a .sql file uses the wrong encoding (not UTF-8), SQLPage now shows a clear error message pointing exactly to the problematic location.

🎨 Improved Visual Error Messages

  • All Errors (e.g., file access issues) now display in a clean, browser-friendly format.
  • No more raw, intimidating plain-text error dumps for errors that happen before rendering starts.

🔽 Smarter Dropdown Handling in Forms

  • The form component now treats numbers and their string equivalents as equal in dropdown values.

  • Makes it easier to use variables for value while preserving dropdown selections.

  • Example:

    select 'form' as component;
    select 
        'select' as type,
        true as create_new,
        true as dropdown,
        '2' as value, -- passed as text even if option values are integers
        '[{"label": "A", "value": 1}, {"label": "B", "value": 2}]' as options;