|
1 | 1 | # CHANGELOG.md
|
2 | 2 |
|
3 |
| -## 0.30.0 (unreleased) |
| 3 | +## 0.31.0 (2024-11-24) |
| 4 | + |
| 5 | +### 🚀 **New Features** |
| 6 | + |
| 7 | +#### **Improved Components** |
| 8 | +- [**Columns Component**](https://sql.datapage.app/component.sql?component=columns) |
| 9 | + - Markdown-supported descriptions (`description_md`) allow richer formatting. |
| 10 | + - Add simple text items without needing JSON handling. |
| 11 | + - Optionally skip displaying items (`null as item`). |
| 12 | + -  |
| 13 | + |
| 14 | +- [**Table Component**](https://sql.datapage.app/component.sql?component=table) |
| 15 | + - New **freeze headers and columns** feature improves usability with large tables. |
| 16 | + - Enhanced search logic ensures more precise matches (e.g., `"xy"` no longer matches separate `x` and `y` cells in adjacent columns). |
| 17 | + - Search box visibility is retained during horizontal scrolling. |
| 18 | + *Technical:* Adds `freeze_headers`, `freeze_columns`, and improves the internal search algorithm. |
| 19 | + -  |
| 20 | + |
| 21 | +- [**Form Component**](https://sql.datapage.app/component.sql?component=form) |
| 22 | + - Added an empty option (`empty_option`) to dropdowns, enabling placeholder-like behavior. |
| 23 | + -  |
| 24 | + - Improved handling of large form submissions with configurable size limits (`max_uploaded_file_size`, default 5MB). |
| 25 | + *Technical:* There used to be a hardcoded limit to 16kB for all forms. |
| 26 | +--- |
| 27 | + |
| 28 | + |
| 29 | +#### **Database Enhancements** |
| 30 | +- **Support for New Data Types**: |
| 31 | + - Microsoft SQL Server now supports `BIT` columns. |
| 32 | + - Improved handling of `DATETIMEOFFSET` in MSSQL and `TIMESTAMPTZ` in PostgreSQL, preserving their timezones instead of converting them to UTC. |
| 33 | + |
| 34 | +- **Better JSON Handling**: |
| 35 | + - Accept nested JSON objects and arrays as function parameters. |
| 36 | + Useful for advanced usage like calling external APIs using `sqlpage.fetch` with complex data structures. |
| 37 | + |
| 38 | +- **SQL Parser Update**: |
| 39 | + - Upgraded to [v0.52.0](https://github.com/apache/datafusion-sqlparser-rs/blob/main/changelog/0.52.0.md) with new features: |
| 40 | + - Added support for: |
| 41 | + - advanced `JSON_TABLE` usage in MySQL for working with JSON arrays. |
| 42 | + - `EXECUTE` statements with parameters in MSSQL for running stored procedures. |
| 43 | + - MSSQL’s `TRY_CONVERT` function for type conversion. |
| 44 | + - `ANY`, `ALL`, and `SOME` subqueries (e.g., `SELECT * FROM t WHERE a = ANY (SELECT b FROM t2)`). |
| 45 | + - `LIMIT max_rows, offset` syntax in SQLite. |
| 46 | + - Assigning column names aliases using `=` in MSSQL (e.g., `SELECT col_name = value`). |
| 47 | + - Fixes a bug where the parser would fail parse a `SET` clause for a variable named `role`. |
| 48 | + |
| 49 | +--- |
| 50 | + |
| 51 | +#### **Security and Performance** |
| 52 | +- **Encrypted Login Support for MSSQL**: |
| 53 | + - Ensures secure connections with flexible encryption modes: |
| 54 | + - No encryption (`?encrypt=not_supported`): For legacy systems and environments where SSL is blocked |
| 55 | + - Partial encryption (`?encrypt=off`): Protects login credentials but not data packets. |
| 56 | + - Full encryption (`?encrypt=on`): Secures both login and data. |
| 57 | + *Technical:* Controlled using the `encrypt` parameter (`not_supported`, `off`, or `strict`) in mssql connection strings. |
| 58 | + |
| 59 | +- **Chart Library Optimization**: |
| 60 | + - Updated ApexCharts to v4.0.0. |
| 61 | + - Fixed duplicate library loads, speeding up pages with multiple charts. |
| 62 | + - Fixed a bug where [timeline chart tooltips displayed the wrong labels](https://github.com/sqlpage/SQLPage/issues/659). |
| 63 | + |
| 64 | +--- |
| 65 | + |
| 66 | +### 🛠 **Bug Fixes** |
| 67 | +#### Database and Compatibility Fixes |
| 68 | +- **Microsoft SQL Server**: |
| 69 | + - Fixed decoding issues for less common data types. |
| 70 | + - Resolved bugs in reading `VARCHAR` columns from non-European collations. |
| 71 | + - Correctly handles `REAL` values. |
| 72 | + |
| 73 | +- **SQLite**: |
| 74 | + - Eliminated spurious warnings when using SQLPage functions with JSON arguments. |
| 75 | + *Technical:* Avoids warnings like `The column _sqlpage_f0_a1 is missing`. |
| 76 | + |
| 77 | +#### Component Fixes |
| 78 | +- **Card Component**: |
| 79 | + - Fixed layout issues with embedded content (e.g., removed double borders). |
| 80 | + -  |
| 81 | + - Corrected misaligned loading spinners. |
| 82 | + |
| 83 | +- **Form Dropdowns**: |
| 84 | + - Resolved state retention after form resets, ensuring dropdowns reset correctly. |
| 85 | + |
| 86 | +#### Usability Enhancements |
| 87 | +- Removed unnecessary padding around tables for cleaner layouts. |
| 88 | +- Increased spacing between items in the columns component for improved readability. |
| 89 | +- Database errors are now consistently logged and displayed with more actionable details. |
| 90 | + -  |
| 91 | + *Technical:* Ensures warnings in the browser and console for faster debugging. |
| 92 | + |
| 93 | +--- |
| 94 | + |
| 95 | +## 0.30.1 (2024-10-31) |
| 96 | +- fix a bug where table sorting would break if table search was not also enabled. |
| 97 | + |
| 98 | +## 0.30.0 (2024-10-30) |
| 99 | + |
| 100 | +### 🤖 Easy APIs |
| 101 | +- **Enhanced CSV Support**: The [CSV component](https://sql.datapage.app/component.sql?component=csv) can now create URLs that trigger a CSV download directly on page load. |
| 102 | + - This finally makes it possible to allow the download of large datasets as CSV |
| 103 | + - This makes it possible to create an API that returns data as CSV and can be easily exposed to other software for interoperabily. |
| 104 | + - **Easy [json](https://sql.datapage.app/component.sql?component=json) APIs** |
| 105 | + - The json component now accepts a second sql query, and will return the results as a json array in a very resource-efficient manner. This makes it easier and faster than ever to build REST APIs entirely in SQL. |
| 106 | + - ```sql |
| 107 | + select 'json' as component; |
| 108 | + select * from users; |
| 109 | + ``` |
| 110 | + - ```json |
| 111 | + [ { "id": 0, "name": "Jon Snow" }, { "id": 1, "name": "Tyrion Lannister" } ] |
| 112 | + ``` |
| 113 | + - **Ease of use** : the component can now be used to automatically format any query result as a json array, without manually using your database''s json functions. |
| 114 | + - **server-sent events** : the component can now be used to stream query results to the client in real-time using server-sent events. |
| 115 | + |
| 116 | +### 🔒 Database Connectivity |
| 117 | +- **Encrypted Microsoft SQL Server Connections**: SQLPage now supports encrypted connections to SQL Server databases, enabling connections to secure databases (e.g., those hosted on Azure). |
| 118 | +- **Separate Database Password Setting**: Added `database_password` [configuration option](https://github.com/sqlpage/SQLPage/blob/main/configuration.md) to store passwords securely outside the connection string. This is useful for security purposes, to avoid accidentally leaking the password in logs. This also allows setting the database password as an environment variable directly, without having to URL-encode it inside the connection string. |
| 119 | + |
| 120 | +### 😎 Developer experience improvements |
| 121 | +- **Improved JSON Handling**: SQLPage now automatically converts JSON strings to JSON objects in databases like SQLite and MariaDB, making it easier to use JSON-based components. |
| 122 | + - ```sql |
| 123 | + -- Now works out of the box in SQLite |
| 124 | + select 'big_number' as component; |
| 125 | + select 'Daily performance' as title, perf as value; |
| 126 | + json_object( |
| 127 | + 'label', 'Monthly', |
| 128 | + 'link', 'monthly.sql' |
| 129 | + ) as dropdown_item |
| 130 | + from performance; |
| 131 | + ``` |
| 132 | + |
| 133 | +### 📈 Table & Search Improvements |
| 134 | +- **Initial Search Value**: Pre-fill the search bar with a default value in tables with `initial_search_value`, making it easier to set starting filters. |
| 135 | +- **Faster Sorting and Searching**: Table filtering and sorting has been entirely rewritten. |
| 136 | + - filtering is much faster for large datasets |
| 137 | + - sorting columns that contain images and links now works as expected |
| 138 | + - Since the new code is smaller, initial page loads should be slightly faster, even on pages that do not use tables |
| 139 | + |
| 140 | +### 🖼️ UI & UX Improvements |
| 141 | + |
| 142 | +- **[Carousel](https://sql.datapage.app/component.sql?component=carousel) Updates**: |
| 143 | + - Autoplay works as expected when embedded in a card. |
| 144 | + - Set image width and height to prevent layout shifts due to varying image sizes. |
| 145 | +- **Improved Site SEO**: The site title in the shell component is no longer in `<h1>` tags, which should aid search engines in understanding content better, and avoid confusing between the site name and the page's title. |
| 146 | +
|
| 147 | +### 🛠️ Fixes and improvements |
4 | 148 |
|
5 |
| - - **Fix**: the search feature in the shell component was not working when no menu item was defined. |
6 |
| - - Add support for encrypted Microsoft SQL Server connections. This finally allows connecting to databases that refuse clear-text connections, such as those hosted on Azure. |
7 |
| - - Easier json handling in databases without a native json type. SQLPage now detects when you use a json function in SQLite or MariaDB to generate a column, and automatically converts the resulting string to a json object. This allows easily using components that take json parameters (like the new columns component) in MariaDB and SQLite. |
8 |
| - - Add a new optional `database_password` configuration option to set the password for the database connection separately from the connection string. This allows to keep the password separate from the connection string, which can be useful for security purposes, logging, and avoids having to percent-encode the password in the connection string. |
| 149 | +- **Shell Component Search**: Fixed search feature when no menu item is defined. |
| 150 | +- **Updated Icons**: The Tabler icon set has been refreshed from 3.10 to 3.21, making many new icons available: https://tabler.io/changelog |
9 | 151 |
|
10 | 152 | ## 0.29.0 (2024-09-25)
|
11 | 153 | - New columns component: `columns`. Useful to display a comparison between items, or large key figures to an user.
|
|
0 commit comments