sqlcx-orm 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -106,6 +106,17 @@ preferences JSONB
|
|
|
106
106
|
|
|
107
107
|
Generates a fully typed TypeBox object schema. Supports nested objects, arrays (`string[]`), and nullable (`string?`).
|
|
108
108
|
|
|
109
|
+
### Partial column selection
|
|
110
|
+
|
|
111
|
+
Only select the columns you need — the generated type matches exactly what you query:
|
|
112
|
+
|
|
113
|
+
```sql
|
|
114
|
+
-- name: ListUsers :many
|
|
115
|
+
SELECT id, name, email FROM users ORDER BY created_at DESC;
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Generates a `ListUsersRow` with only `{ id: number; name: string; email: string }` — not the full table type. No over-fetching in your types.
|
|
119
|
+
|
|
109
120
|
### `RETURNING` clause support
|
|
110
121
|
|
|
111
122
|
```sql
|