You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: changelog.md
+54-54Lines changed: 54 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,60 +10,6 @@ Note: The changelog for the older version can be found here: [Changelog Archive]
10
10
11
11
---
12
12
13
-
### Aggregated Comment Annotation Logging
14
-
15
-
Comment annotation debug logs are now aggregated into a single line per endpoint instead of one line per annotation. This significantly reduces log noise during development.
16
-
17
-
**Before (multiple Debug lines per endpoint):**
18
-
```
19
-
[DBG] SQL file: who-am-i.sql mapped to GET /api/who-am-i has set HTTP by the comment annotation to GET /api/who-am-i
20
-
[DBG] SQL file: who-am-i.sql mapped to GET /api/who-am-i has set REQUIRED AUTHORIZATION by the comment annotation.
21
-
[DBG] SQL file: who-am-i.sql mapped to GET /api/who-am-i has set SINGLE RECORD by the comment annotation.
22
-
```
23
-
24
-
**After (one Debug line per endpoint):**
25
-
```
26
-
[DBG] SQL file: who-am-i.sql mapped to GET /api/who-am-i annotations: [HTTP GET, authorize, single]
27
-
```
28
-
29
-
The individual per-annotation log messages are still available at **Trace** level for detailed debugging.
30
-
31
-
---
32
-
33
-
### New Comment Annotation: `@single`
34
-
35
-
New comment annotation `single` (aliases: `single_record`, `single_result`) that returns a single record as a JSON object instead of a JSON array.
36
-
37
-
Works across all endpoint sources: PostgreSQL functions, SQL files, and CRUD endpoints.
38
-
39
-
**Usage:**
40
-
41
-
```sql
42
-
-- PostgreSQL function
43
-
CREATEFUNCTIONget_user(int) RETURNS TABLE(id int, name text) ...
- Multi-column results return a JSON object (no array wrapping)
60
-
- Single unnamed column results return a bare JSON value (e.g., `"hello"`, `42`)
61
-
- If the query returns multiple rows, only the first row is returned (early exit from rendering loop)
62
-
- Empty results respect the `response_null` annotation: `empty_string` (default), `null_literal`, or `no_content` (204)
63
-
- TypeScript client generates `Promise<IResponse>` instead of `Promise<IResponse[]>`
64
-
65
-
---
66
-
67
13
### New Endpoint Source Plugin: `NpgsqlRest.SqlFileSource`
68
14
69
15
In addition to the existing endpoint sources — **RoutineSource** (PostgreSQL functions and procedures) and **CrudSource** (tables and views) — NpgsqlRest now supports a third source: **SQL files**.
@@ -700,6 +646,60 @@ Works on all endpoint sources: functions, procedures, tables/views (CRUD), and S
700
646
701
647
---
702
648
649
+
### New Comment Annotation: `@single`
650
+
651
+
New comment annotation `single` (aliases: `single_record`, `single_result`) that returns a single record as a JSON object instead of a JSON array.
652
+
653
+
Works across all endpoint sources: PostgreSQL functions, SQL files, and CRUD endpoints.
654
+
655
+
**Usage:**
656
+
657
+
```sql
658
+
-- PostgreSQL function
659
+
CREATEFUNCTIONget_user(int) RETURNS TABLE(id int, name text) ...
- Multi-column results return a JSON object (no array wrapping)
676
+
- Single unnamed column results return a bare JSON value (e.g., `"hello"`, `42`)
677
+
- If the query returns multiple rows, only the first row is returned (early exit from rendering loop)
678
+
- Empty results respect the `response_null` annotation: `empty_string` (default), `null_literal`, or `no_content` (204)
679
+
- TypeScript client generates `Promise<IResponse>` instead of `Promise<IResponse[]>`
680
+
681
+
---
682
+
683
+
### Aggregated Comment Annotation Logging
684
+
685
+
Comment annotation debug logs are now aggregated into a single line per endpoint instead of one line per annotation. This significantly reduces log noise during development.
686
+
687
+
**Before (multiple Debug lines per endpoint):**
688
+
```
689
+
[DBG] SQL file: who-am-i.sql mapped to GET /api/who-am-i has set HTTP by the comment annotation to GET /api/who-am-i
690
+
[DBG] SQL file: who-am-i.sql mapped to GET /api/who-am-i has set REQUIRED AUTHORIZATION by the comment annotation.
691
+
[DBG] SQL file: who-am-i.sql mapped to GET /api/who-am-i has set SINGLE RECORD by the comment annotation.
692
+
```
693
+
694
+
**After (one Debug line per endpoint):**
695
+
```
696
+
[DBG] SQL file: who-am-i.sql mapped to GET /api/who-am-i annotations: [HTTP GET, authorize, single]
697
+
```
698
+
699
+
The individual per-annotation log messages are still available at **Trace** level for detailed debugging.
700
+
701
+
---
702
+
703
703
## Version [3.11.1](https://github.com/NpgsqlRest/NpgsqlRest/tree/3.11.1) (2026-03-13)
0 commit comments