Skip to content

Commit 5b86aa6

Browse files
committed
changelog
1 parent 28d0bee commit 5b86aa6

File tree

1 file changed

+80
-55
lines changed

1 file changed

+80
-55
lines changed

CHANGELOG.md

Lines changed: 80 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,103 +2,124 @@
22

33
## 0.33.0 (2025-02-15)
44

5-
### Routing & URL Enhancements
5+
### 1. Routing & URL Enhancements 🔀
66

77
#### **Clean URLs:**
8+
Access your pages without the extra “.sql” suffix. For instance, if your file is `page.sql`, you can now use either:
89

9-
Now, you can access your pages without the extra “.sql” suffix. For example, if you’ve got a file called `page.sql`, simply use:
10-
11-
| old | new |
10+
| Old URL | New URL |
1211
|---|---|
13-
| `https://example.com/page.sql` | Either `https://example.com/page` or `https://example.com/page.sql`
12+
| `https://example.com/page.sql` | `https://example.com/page` (or `page.sql` still works) |
1413

15-
The previous behavior is preserved, so adding “.sql” still works. A big shout‑out to [@guspower](https://github.com/guspower) for their contributions!
14+
Big thanks to [@guspower](https://github.com/guspower) for their contributions!
1615

17-
#### **Complete Routing Rewrite**
18-
We’ve reworked our request routing system from top to bottom to make things smoother and more predictable for every request.
16+
#### **Complete Routing Rewrite:**
17+
We overhauled our request routing system for smoother, more predictable routing across every request.
1918

20-
### SQLPage functions
19+
---
2120

22-
#### sqlpage.fetch (call external services from SQLPage)
21+
### 2. SQLPage Functions ⚙️
2322

24-
**HTTP Basic Authentication**
25-
SQLPage’s `sqlpage.fetch(request)` function now supports HTTP Basic Authentication. Quickly call external APIs that require a username and password. For example, in PostgreSQL:
26-
```sql
27-
SET result = sqlpage.fetch(json_object(
28-
'url', 'https://api.example.com/data',
29-
'username', 'user',
30-
'password', 'pass'
31-
));
32-
```
33-
Learn more in the [fetch documentation](https://sql-page.com/documentation.sql?component=fetch#component).
23+
#### **sqlpage.fetch (Calling External Services)**
3424

35-
**Smarter fetch errors & Headers Defaults:**
36-
When your HTTP request definition is off, you’ll now get clearer error messages — especially if there are unknown fields.
37-
Plus, the `headers` parameter is now optional: if omitted, SQLPage sends a default User‑Agent header that includes the SQLPage version.
25+
- **HTTP Basic Authentication:**
26+
SQLPage’s `sqlpage.fetch(request)` now supports HTTP Basic Auth. Easily call APIs requiring a username/password. For example:
3827

39-
**New Function: sqlpage.headers**
40-
Easily manage and inspect HTTP headers with the brand‑new [`sqlpage.headers`](https://sql-page.com/functions.sql?function=headers) function.
28+
```sql
29+
SET result = sqlpage.fetch(json_object(
30+
'url', 'https://api.example.com/data',
31+
'username', 'user',
32+
'password', 'pass'
33+
));
34+
```
35+
Check out the [[fetch documentation](https://sql-page.com/documentation.sql?component=fetch#component)](https://sql-page.com/documentation.sql?component=fetch#component) for more.
36+
37+
- **Smarter Fetch Errors & Headers Defaults:**
38+
Get clearer error messages if your HTTP request definition is off (unknown fields, etc.). Plus, if you omit the `headers` parameter, SQLPage now sends a default User‑Agent header that includes the SQLPage version.
39+
40+
- New Functions: [`sqlpage.request_body`](https://sql-page.com/functions.sql?function=request_body) and [`sqlpage.request_body_base64`](https://sql-page.com/functions.sql?function=request_body_base64)
41+
- Return the raw request body as a string or base64 encoded string.
42+
- Useful to build REST JSON APIs in SQL easily.
43+
- Example:
44+
```sql
45+
INSERT INTO users (name, email)
46+
VALUES (
47+
json(sqlpage.request_body())->>'name',
48+
json(sqlpage.request_body())->>'email'
49+
);
50+
```
4151

42-
### UI Component Enhancements
52+
- **New Function: [sqlpage.headers](https://sql-page.com/functions.sql?function=headers):**
53+
Easily manage and inspect HTTP headers with the brand‑new [`sqlpage.headers`](https://sql-page.com/functions.sql?function=headers) function.
4354

44-
#### Table & Card Components
55+
### 3. UI Component Enhancements 🎨
56+
57+
#### **Table & Card Components**
4558

4659
- **Table CSS Fixes:**
47-
We fixed a bug that prevented proper CSS classes from being added to table cells. This fixes alignment in tables.
60+
We fixed a bug where table cells weren’t getting the right CSS classes—your tables now align perfectly.
4861

4962
- **Native Number Formatting:**
50-
Numeric values in tables are automatically formatted to your visitor’s locale. That means thousands separators, correct decimal points, and sorting that respects numeric order—without any extra work from you.
51-
![image](https://github.com/user-attachments/assets/ba51a63f-b9ce-4ab2-a6dd-dfa8e22396de)
52-
53-
Not a formatted string in the database—just pure, locale‑sensitive output.
63+
Numeric values in tables are now automatically formatted to your visitor’s locale with proper thousands separators and decimal points, and sorted numerically.
64+
_Example:_
65+
![Number Formatting Example](https://github.com/user-attachments/assets/ba51a63f-b9ce-4ab2-a6dd-dfa8e22396de)
5466

5567
- **Enhanced Card Layouts:**
56-
Creating custom layouts with the `card` component is now easier:
57-
- The `embed` property automatically appends the `_sqlpage_embed` parameter to render your page as an embeddable fragment.
58-
- When an embedded page is rendered, the `shell` component is replaced by `shell-empty` to avoid duplicate headers and metadata.
59-
- ![screen](https://github.com/user-attachments/assets/c5b58402-178a-441e-8966-fd8e341b02bc)
68+
Customizing your `card` components is now easier:
69+
- The `embed` property auto‑appends the `_sqlpage_embed` parameter for embeddable fragments.
70+
- When rendering an embedded page, the `shell` component is replaced by `shell-empty` to avoid duplicate headers and metadata.
71+
![Card Layout Example](https://github.com/user-attachments/assets/c5b58402-178a-441e-8966-fd8e341b02bc)
6072

61-
#### Form Component Boosts
73+
#### **Form Component Boosts**
6274

6375
- **Auto‑Submit Forms:**
64-
Add the new `auto_submit` parameter to your forms, and watch them auto‑submit on any field change—perfect for instant filters on dashboards.
76+
Set `auto_submit` to true and your form will instantly submit on any field change—ideal for dashboard filters.
6577
*Example:*
6678
```sql
6779
SELECT 'form' AS component, 'Filter Results' AS title, true AS auto_submit;
6880
SELECT 'date' AS name;
6981
```
7082
- **Dynamic Options for Dropdowns:**
71-
Use the new `options_source` parameter to load dropdown options dynamically from another SQL file. Great for autocomplete on huge option lists!
83+
Use `options_source` to load dropdown options dynamically from another SQL file. Perfect for autocomplete with large option sets.
7284
*Example:*
7385
```sql
7486
SELECT 'form' AS component, 'Select Country' AS title, 'countries.sql' AS options_source;
7587
SELECT 'country' AS name;
7688
```
7789
- **Markdown in Field Descriptions:**
78-
With the new `description_md` property, you can now render markdown in form field descriptions to better guide your users.
79-
90+
With the new `description_md` property, render markdown in form field descriptions for improved guidance.
8091
- **Improved Header Error Messages:**
81-
If you accidentally use a header component (like `json` or `cookie`) after sending data, you’ll now see a more helpful error message.
92+
Now you’ll get more helpful errors if header components (e.g., `json`, `cookie`) are used incorrectly.
93+
94+
---
8295

83-
### Chart, Icons & CSS Updates
96+
### 4. Chart, Icons & CSS Updates 📊
8497

8598
- **ApexCharts Upgrade:**
86-
We’ve updated ApexCharts to [v4.4.0](https://github.com/apexcharts/apexcharts.js/releases/tag/v4.4.0). Expect smoother charts with bug fixes for your visualizations.
99+
We updated ApexCharts to [[v4.4.0](https://github.com/apexcharts/apexcharts.js/releases/tag/v4.4.0)](https://github.com/apexcharts/apexcharts.js/releases/tag/v4.4.0) for smoother charts and minor bug fixes.
87100

88101
- **Tabler Icons & CSS:**
89-
Enjoy a refreshed look with Tabler Icons updated to [v3.30.0](https://tabler.io/changelog#/changelog/tabler-icons-3.30) and the CSS framework upgraded to [Tabler 1.0.0](https://github.com/tabler/tabler/releases/tag/v1.0.0). More icons, better consistency, and a sleeker interface.
102+
Enjoy a refreshed look:
103+
- Tabler Icons are now [[v3.30.0](https://tabler.io/changelog#/changelog/tabler-icons-3.30)](https://tabler.io/changelog#/changelog/tabler-icons-3.30) with many new icons.
104+
- The CSS framework has been upgraded to [[Tabler 1.0.0](https://github.com/tabler/tabler/releases/tag/v1.0.0)](https://github.com/tabler/tabler/releases/tag/v1.0.0) for improved consistency and a sleeker interface.
105+
106+
---
90107

91-
### 5. CSV Import & Error Handling
108+
### 5. CSV Import & Error Handling 📥
92109

93110
- **Enhanced CSV Error Messages:**
94-
We improved error messages when a CSV import fails (using a `copy` statement and file upload).
95-
- **Postgres CSV Bug Fix**
96-
A pesky bug causing subsequent requests to fail after a CSV import error on PostgreSQL is now fixed. (See [Issue #788](https://github.com/sqlpage/SQLPage/issues/788) for details.)
111+
More descriptive error messages when a CSV import fails (via `copy` and file upload).
112+
113+
- **Postgres CSV Bug Fix:**
114+
A bug that caused subsequent requests to fail after a CSV import error on PostgreSQL is now fixed.
115+
(See [Issue #788](https://github.com/sqlpage/SQLPage/issues/788) for details.)
116+
117+
---
97118

98-
### 6. SQL Parser & Advanced SQL Support
119+
### 6. SQL Parser & Advanced SQL Support 🔍
99120

100-
**Upgraded SQL Parser (v0.54):**
101-
Our sqlparser is now at [v0.54](https://github.com/apache/datafusion-sqlparser-rs/blob/main/changelog/0.54.0.md), offering enhanced support for advanced SQL syntax. New additions include:
121+
**Upgraded SQL Parser ([v0.54](https://github.com/apache/datafusion-sqlparser-rs/blob/main/changelog/0.54.0.md)):**
122+
Our sqlparser is now at [v0.54](https://github.com/apache/datafusion-sqlparser-rs/blob/main/changelog/0.54.0.md), with support for advanced SQL syntax:
102123

103124
- **INSERT...SELECT...RETURNING:**
104125
```sql
@@ -109,10 +130,14 @@ Our sqlparser is now at [v0.54](https://github.com/apache/datafusion-sqlparser-r
109130
```
110131
- **PostgreSQL’s overlaps operator:**
111132
```sql
112-
SELECT 'card' AS component;
113-
SELECT event_name AS title, start_time || ' - ' || end_time AS description
133+
SELECT 'card' AS component,
134+
event_name AS title,
135+
start_time::text || ' - ' || end_time::text AS description
114136
FROM events
115-
WHERE (start_time, end_time) overlaps ($start_filter::timestamp, $end_filter::timestamp);
137+
WHERE
138+
(start_time, end_time)
139+
OVERLAPS
140+
($start_filter::timestamp, $end_filter::timestamp);
116141
```
117142
- **MySQL’s INSERT...SET syntax:**
118143
```sql

0 commit comments

Comments
 (0)